Update detection_api.py
Browse files- 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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()
|