Haiss123 commited on
Commit
00d0c1d
·
verified ·
1 Parent(s): 785b2f2

Update detection_api.py

Browse files
Files changed (1) hide show
  1. detection_api.py +6 -1
detection_api.py CHANGED
@@ -759,4 +759,9 @@ async def cleanup_old_files(hours: int = 24):
759
  if __name__ == "__main__":
760
  import os
761
  port = int(os.environ.get("PORT", 7860))
762
- uvicorn.run(app, host="0.0.0.0", port=port, workers=2)
 
 
 
 
 
 
759
  if __name__ == "__main__":
760
  import os
761
  port = int(os.environ.get("PORT", 7860))
762
+ options = {
763
+ "bind": f"0.0.0.0:{port}",
764
+ "workers": 2,
765
+ "worker_class": "uvicorn.workers.UvicornWorker",
766
+ }
767
+ StandaloneApplication(app, options).run()