EurekaPotato commited on
Commit
2ec7684
·
verified ·
1 Parent(s): 845b7b0

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. 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
- uvicorn.run(app, host="0.0.0.0", port=7860)
 
 
 
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)