Spaces:
Sleeping
Sleeping
Commit
·
95ec67a
1
Parent(s):
bfc585e
fix start
Browse files
main.py
CHANGED
@@ -34,9 +34,4 @@ async def classify_data(data: InputData):
|
|
34 |
|
35 |
return {"prediction": prediction, "confidence": confidence}
|
36 |
except Exception as e:
|
37 |
-
raise HTTPException(status_code=500, detail=f"Error during classification: {str(e)}")
|
38 |
-
|
39 |
-
if __name__ == "__main__":
|
40 |
-
# Load the model at startup
|
41 |
-
load_model()
|
42 |
-
uvicorn.run(app, host="0.0.0.0", port=8000)
|
|
|
34 |
|
35 |
return {"prediction": prediction, "confidence": confidence}
|
36 |
except Exception as e:
|
37 |
+
raise HTTPException(status_code=500, detail=f"Error during classification: {str(e)}")
|
|
|
|
|
|
|
|
|
|