Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -93,17 +93,17 @@ def upload():
|
|
| 93 |
frame_images="|".join(frame_images)
|
| 94 |
)) # <-- this is the required closing parenthesis
|
| 95 |
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
|
| 108 |
if __name__ == '__main__':
|
| 109 |
app.run(host='0.0.0.0', port=7860, debug=False)
|
|
|
|
| 93 |
frame_images="|".join(frame_images)
|
| 94 |
)) # <-- this is the required closing parenthesis
|
| 95 |
|
| 96 |
+
@app.route('/uploads/<path:filename>')
|
| 97 |
+
def uploaded_file(filename):
|
| 98 |
+
full_path = os.path.join('/tmp/uploads', filename)
|
| 99 |
+
print(f"📤 Serving upload: {full_path}")
|
| 100 |
+
return send_from_directory('/tmp/uploads', filename)
|
| 101 |
+
|
| 102 |
+
@app.route('/results/<path:filename>')
|
| 103 |
+
def result_file(filename):
|
| 104 |
+
full_path = os.path.join('/tmp/results', filename)
|
| 105 |
+
print(f"🧾 Serving flat result path: {full_path}")
|
| 106 |
+
return send_from_directory('/tmp/results', filename)
|
| 107 |
|
| 108 |
if __name__ == '__main__':
|
| 109 |
app.run(host='0.0.0.0', port=7860, debug=False)
|