Nymbo commited on
Commit
a499d04
·
verified ·
1 Parent(s): c752c86

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -16
app.py CHANGED
@@ -35,21 +35,14 @@ def main():
35
  demo = ui_components.create_interface()
36
 
37
  # Launch the application
38
- # On Hugging Face Spaces, let Gradio/HF set host/port and OAuth config to ensure redirect_uri matches the Space domain.
39
- if os.getenv("SPACE_ID"):
40
- demo.launch(
41
- debug=False,
42
- max_threads=40
43
- )
44
- else:
45
- demo.launch(
46
- debug=AppConfig.DEBUG_MODE,
47
- share=False, # Set to True if you want to create a public link
48
- server_name="0.0.0.0", # Allow external connections
49
- server_port=int(os.getenv("PORT", "7860")),
50
- auth=None, # No authentication (handled by HF login)
51
- max_threads=40 # Allow multiple concurrent users
52
- )
53
 
54
  logger.info("✅ Universal MCP Client started successfully!")
55
 
@@ -58,4 +51,4 @@ def main():
58
  raise
59
 
60
  if __name__ == "__main__":
61
- main()
 
35
  demo = ui_components.create_interface()
36
 
37
  # Launch the application
38
+ demo.launch(
39
+ debug=AppConfig.DEBUG_MODE,
40
+ share=False, # Set to True if you want to create a public link
41
+ server_name="0.0.0.0", # Allow external connections
42
+ server_port=7860, # Default Gradio port
43
+ auth=None, # No authentication (handled by HF login)
44
+ max_threads=40 # Allow multiple concurrent users
45
+ )
 
 
 
 
 
 
 
46
 
47
  logger.info("✅ Universal MCP Client started successfully!")
48
 
 
51
  raise
52
 
53
  if __name__ == "__main__":
54
+ main()