GoodLuckChuck commited on
Commit
9dfe1f5
·
verified ·
1 Parent(s): 10df2f5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -7
app.py CHANGED
@@ -1121,10 +1121,7 @@ with gr.Blocks() as demo:
1121
  # Mount Gradio app to FastAPI
1122
  app = gr.mount_gradio_app(app, demo, path="/")
1123
 
1124
- # For Hugging Face Spaces, we don't need to run the server manually
1125
- # The platform will handle it for us
1126
- if __name__ == "__main__":
1127
- # Only run the server directly when not in a Hugging Face Space
1128
- if not os.environ.get("SPACE_ID"):
1129
- import uvicorn
1130
- uvicorn.run(app, host="0.0.0.0", port=7860)
 
1121
  # Mount Gradio app to FastAPI
1122
  app = gr.mount_gradio_app(app, demo, path="/")
1123
 
1124
+ # Remove or comment out the manual server start
1125
+ # if __name__ == "__main__":
1126
+ # import uvicorn
1127
+ # uvicorn.run(app, host="0.0.0.0", port=7860)