measmonysuon commited on
Commit
8c673a1
·
verified ·
1 Parent(s): d092f1e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -93,7 +93,10 @@ def index():
93
 
94
 
95
  def run_gradio():
96
- iface.launch(share=True, inbrowser=False)
 
 
 
97
 
98
  if __name__ == "__main__":
99
  # Run Gradio in a separate thread
 
93
 
94
 
95
  def run_gradio():
96
+ try:
97
+ iface.launch(server_port=7860, share=True, inbrowser=False) # Specify a port
98
+ except Exception as e:
99
+ logger.error(f"Error launching Gradio: {e}")
100
 
101
  if __name__ == "__main__":
102
  # Run Gradio in a separate thread