Update detection_api.py
Browse files- detection_api.py +6 -7
detection_api.py
CHANGED
|
@@ -746,10 +746,9 @@ async def cleanup_old_files(hours: int = 24):
|
|
| 746 |
|
| 747 |
if __name__ == "__main__":
|
| 748 |
import os
|
| 749 |
-
|
| 750 |
-
|
| 751 |
-
|
| 752 |
-
|
| 753 |
-
|
| 754 |
-
|
| 755 |
-
)
|
|
|
|
| 746 |
|
| 747 |
if __name__ == "__main__":
|
| 748 |
import os
|
| 749 |
+
port = int(os.environ.get("PORT", 7860))
|
| 750 |
+
options = {
|
| 751 |
+
"bind": f"0.0.0.0:{port}",
|
| 752 |
+
"workers": 2,
|
| 753 |
+
}
|
| 754 |
+
StandaloneApplication(app, options).run()
|
|
|