Spaces:
Sleeping
Sleeping
Commit ·
7ce3771
1
Parent(s): d237a5a
Model Changes
Browse files1300 unmodified lines130113021303130413051306130713081309131013111312131313141300 unmodified lines# Configure for deploymentdemo.queue(max_size=20)# Mount Gradio on FastAPIapp = gr.mount_gradio_app(api_app, demo, path="/")if __name__ == "__main__":demo.launch(server_name="0.0.0.0",server_port=7860,share=False,show_error=True,max_threads=10)1300 unmodified lines13011302130313041305130613071308130913101311131213131314131513161317131813191300 unmodified lines# Configure for deploymentdemo.queue(max_size=20)# Mount Gradio on FastAPI. This `app` object is what we will run.app = gr.mount_gradio_app(api_app, demo, path="/")# Use this block to run the app correctly with Uvicornif __name__ == "__main__":print("Starting server with Uvicorn...")# This is the correct way to run your combined app.# It uses the `app` object we created above and allows `root_path` to work.# We have REMOVED demo.launch().uvicorn.run(app,host="0.0.0.0",port=7860,root_path="/" # This is the crucial setting for deployment)
app.py+13-8