Spaces:
Sleeping
Sleeping
142502022 commited on
Commit ·
6b652c0
1
Parent(s): b000b38
Fix: app mount upload location
Browse files- backend/main.py +2 -2
backend/main.py
CHANGED
|
@@ -200,7 +200,7 @@ UPLOAD_FOLDER = "/tmp/uploads"
|
|
| 200 |
os.makedirs(UPLOAD_FOLDER, exist_ok=True)
|
| 201 |
|
| 202 |
# Serve uploaded images as static files
|
| 203 |
-
app.mount("/uploads", StaticFiles(directory=UPLOAD_FOLDER), name="uploads")
|
| 204 |
|
| 205 |
# ========================================
|
| 206 |
# Endpoints
|
|
@@ -391,7 +391,7 @@ async def explain_classification(request: ExplanationRequest):
|
|
| 391 |
"message": f"Failed to generate explanation: {str(e)}"
|
| 392 |
}
|
| 393 |
)
|
| 394 |
-
|
| 395 |
|
| 396 |
app.mount("/", StaticFiles(directory="frontend", html=True), name="frontend")
|
| 397 |
# ========================================
|
|
|
|
| 200 |
os.makedirs(UPLOAD_FOLDER, exist_ok=True)
|
| 201 |
|
| 202 |
# Serve uploaded images as static files
|
| 203 |
+
# app.mount("/uploads", StaticFiles(directory=UPLOAD_FOLDER), name="uploads")
|
| 204 |
|
| 205 |
# ========================================
|
| 206 |
# Endpoints
|
|
|
|
| 391 |
"message": f"Failed to generate explanation: {str(e)}"
|
| 392 |
}
|
| 393 |
)
|
| 394 |
+
app.mount("/uploads", StaticFiles(directory=UPLOAD_FOLDER), name="uploads")
|
| 395 |
|
| 396 |
app.mount("/", StaticFiles(directory="frontend", html=True), name="frontend")
|
| 397 |
# ========================================
|