Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
|
@@ -6,9 +6,7 @@ import shutil
|
|
| 6 |
import os
|
| 7 |
from single_person_processor import SinglePersonPredictor
|
| 8 |
|
| 9 |
-
|
| 10 |
-
async def root():
|
| 11 |
-
return {"message": "FastAPI is running!"}
|
| 12 |
|
| 13 |
app = FastAPI()
|
| 14 |
|
|
@@ -20,6 +18,9 @@ app.add_middleware(
|
|
| 20 |
allow_headers=["*"], # Allow all headers
|
| 21 |
)
|
| 22 |
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
# Initialize the predictor
|
| 25 |
predictor = SinglePersonPredictor(model_path="best_model.keras")
|
|
|
|
| 6 |
import os
|
| 7 |
from single_person_processor import SinglePersonPredictor
|
| 8 |
|
| 9 |
+
|
|
|
|
|
|
|
| 10 |
|
| 11 |
app = FastAPI()
|
| 12 |
|
|
|
|
| 18 |
allow_headers=["*"], # Allow all headers
|
| 19 |
)
|
| 20 |
|
| 21 |
+
@app.get("/")
|
| 22 |
+
async def root():
|
| 23 |
+
return {"message": "FastAPI is running! Use /docs for API documentation."}
|
| 24 |
|
| 25 |
# Initialize the predictor
|
| 26 |
predictor = SinglePersonPredictor(model_path="best_model.keras")
|