GoogleCalc commited on
Commit
156ba3e
·
verified ·
1 Parent(s): 1021d28

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -2020,7 +2020,15 @@ def sitemap():
2020
  app = gr.mount_gradio_app(app, demo, path="/")
2021
 
2022
  if __name__ == "__main__":
2023
- port = int(os.environ.get("GRADIO_SERVER_PORT", os.environ.get("PORT", 7860)))
 
 
 
 
 
 
 
 
2024
 
2025
  demo.launch(
2026
  server_name="0.0.0.0",
 
2020
  app = gr.mount_gradio_app(app, demo, path="/")
2021
 
2022
  if __name__ == "__main__":
2023
+ import uvicorn
2024
+
2025
+ port = int(os.environ.get("PORT", 7860))
2026
+
2027
+ uvicorn.run(
2028
+ app,
2029
+ host="0.0.0.0",
2030
+ port=port,
2031
+ )
2032
 
2033
  demo.launch(
2034
  server_name="0.0.0.0",