Spaces:
Running
Running
command to run the server
Browse files
app.py
CHANGED
@@ -68,4 +68,10 @@ async def handle_prediction(request: PredictionRequest):
|
|
68 |
return JSONResponse(content={"data": [result_dict]})
|
69 |
|
70 |
except Exception as e:
|
71 |
-
return JSONResponse(status_code=500, content={"error": str(e)})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
return JSONResponse(content={"data": [result_dict]})
|
69 |
|
70 |
except Exception as e:
|
71 |
+
return JSONResponse(status_code=500, content={"error": str(e)})
|
72 |
+
|
73 |
+
import uvicorn
|
74 |
+
|
75 |
+
if __name__ == "__main__":
|
76 |
+
# The port number (7860) is the standard port for Hugging Face Spaces
|
77 |
+
uvicorn.run(app, host="0.0.0.0", port=7860)
|