ishworrsubedii commited on
Commit
155f656
·
verified ·
1 Parent(s): 3819f46

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -11
app.py CHANGED
@@ -195,14 +195,6 @@ if __name__ == "__main__":
195
  import os
196
  import uvicorn
197
 
198
- # Special handling for Hugging Face
199
- if os.environ.get("SPACE_ID"):
200
- # Running on Hugging Face Spaces
201
- port = int(os.environ.get("PORT", 7860))
202
- uvicorn.run(app, host="0.0.0.0", port=port)
203
- elif (mode := os.getenv("MODE")) == "UI":
204
- stream.ui.launch(server_port=7860)
205
- elif mode == "PHONE":
206
- stream.fastphone(host="localhost", port=7860)
207
- else:
208
- uvicorn.run(app, host="localhost", port=7860)
 
195
  import os
196
  import uvicorn
197
 
198
+ port = int(os.environ.get("PORT", 7860))
199
+ uvicorn.run(app, host="0.0.0.0", port=port)
200
+