ElmahdiJaouali commited on
Commit ·
014be24
1
Parent(s): deb9ec9
Fix: Create static directory before mounting to prevent RuntimeError
Browse files- api/main.py +1 -0
api/main.py
CHANGED
|
@@ -29,6 +29,7 @@ app.add_middleware(
|
|
| 29 |
)
|
| 30 |
|
| 31 |
# Mount static files
|
|
|
|
| 32 |
app.mount("/static", StaticFiles(directory="static"), name="static")
|
| 33 |
|
| 34 |
# Global variables for models and artifacts
|
|
|
|
| 29 |
)
|
| 30 |
|
| 31 |
# Mount static files
|
| 32 |
+
os.makedirs("static", exist_ok=True)
|
| 33 |
app.mount("/static", StaticFiles(directory="static"), name="static")
|
| 34 |
|
| 35 |
# Global variables for models and artifacts
|