skibi11 commited on
Commit
c676187
·
verified ·
1 Parent(s): 1490129

command to run the server

Browse files
Files changed (1) hide show
  1. app.py +7 -1
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)