Skip to content
Snippets Groups Projects
Commit a81c28ba authored by Herman Andersen Dyrkorn's avatar Herman Andersen Dyrkorn
Browse files

remove imports

parent 209e014f
No related branches found
No related tags found
1 merge request!37Resolve "rematch function and endpoint"
......@@ -7,9 +7,8 @@ import cv2
import os
from api import limiter
from image_encoder.image_encoder import *
import glob
from path_constants import image_type
ALLOWED_EXTENSIONS = ['jpg']
ALLOWED_EXTENSIONS = ['jpg', 'png', 'jpeg']
# findSalamanderInfo endpoint
......@@ -28,8 +27,7 @@ class FindSalamanderInfo(Resource):
temp_img_path = os.path.abspath("./temp_images/")
image.filename = str(user_id) + "." + extension(image.filename)
image.save(os.path.join(temp_img_path, image.filename))
execution_path = os.path.abspath(os.getcwd())
img = cv2.imread(execution_path + "./temp_images/" + str(user_id) + "." + extension(image.filename), 1)
img = cv2.imread(os.path.join("./temp_images", str(user_id) + "." + extension(image.filename)), 1)
# run AI on image
str_image, _, _, _, _ = straighten(img)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment