Spaces:
Running
Running
app
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ import copy
|
|
37 |
|
38 |
|
39 |
# Upload Folder
|
40 |
-
UPLOAD_FOLDER = 'static/temp/uploads'
|
41 |
if not os.path.exists(UPLOAD_FOLDER):
|
42 |
os.makedirs(UPLOAD_FOLDER)
|
43 |
|
@@ -83,7 +83,7 @@ def allowed_file(filename):
|
|
83 |
|
84 |
@app.route('/upload', methods=['GET', 'POST'])
|
85 |
def upload_files():
|
86 |
-
UPLOAD_FOLDER = 'static/temp/uploads'
|
87 |
if not os.path.exists(UPLOAD_FOLDER):
|
88 |
os.makedirs(UPLOAD_FOLDER)
|
89 |
if request.method == 'POST':
|
@@ -190,11 +190,11 @@ def predict_files(filenames):
|
|
190 |
|
191 |
|
192 |
|
193 |
-
@app.route('/get_inference_image')
|
194 |
-
def get_inference_image():
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
|
199 |
|
200 |
def process_images(model_path: str, images_path: str) -> None:
|
|
|
37 |
|
38 |
|
39 |
# Upload Folder
|
40 |
+
UPLOAD_FOLDER = r'static/temp/uploads'
|
41 |
if not os.path.exists(UPLOAD_FOLDER):
|
42 |
os.makedirs(UPLOAD_FOLDER)
|
43 |
|
|
|
83 |
|
84 |
@app.route('/upload', methods=['GET', 'POST'])
|
85 |
def upload_files():
|
86 |
+
UPLOAD_FOLDER = r'static/temp/uploads'
|
87 |
if not os.path.exists(UPLOAD_FOLDER):
|
88 |
os.makedirs(UPLOAD_FOLDER)
|
89 |
if request.method == 'POST':
|
|
|
190 |
|
191 |
|
192 |
|
193 |
+
# @app.route('/get_inference_image')
|
194 |
+
# def get_inference_image():
|
195 |
+
# # Assuming the new image is stored in the 'inferenced' folder with the name 'temp_inference.jpg'
|
196 |
+
# inferenced_image = 'static/temp/inferenced/temp_inference.jpg'
|
197 |
+
# return jsonify(updatedImagePath=inferenced_image), 200 # Return the image path with a 200 status code
|
198 |
|
199 |
|
200 |
def process_images(model_path: str, images_path: str) -> None:
|