Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- handler.py +3 -1
handler.py
CHANGED
|
@@ -266,4 +266,6 @@ async def extract_text_features(data: TextRequest):
|
|
| 266 |
|
| 267 |
if __name__ == "__main__":
|
| 268 |
import uvicorn
|
| 269 |
-
|
|
|
|
|
|
|
|
|
| 266 |
|
| 267 |
if __name__ == "__main__":
|
| 268 |
import uvicorn
|
| 269 |
+
import os
|
| 270 |
+
port = int(os.environ.get("PORT", 7860))
|
| 271 |
+
uvicorn.run(app, host="0.0.0.0", port=port)
|