yugapurush commited on
Commit
6a1eea4
·
1 Parent(s): 688ceba

second coming of christ

Browse files
Files changed (1) hide show
  1. app.py +7 -25
app.py CHANGED
@@ -180,36 +180,18 @@ if __name__ == '__main__':
180
  try:
181
  demo = create_interface()
182
 
183
- # Launch with MCP server but with better error handling
184
- logger.info("Starting Gradio application with MCP server...")
185
-
186
- # Try launching with MCP server first
187
- try:
188
- demo.launch(
189
- mcp_server=True,
190
- server_name="127.0.0.1",
191
- server_port=7860,
192
- share=False,
193
- debug=True,
194
- show_error=True
195
- )
196
- except Exception as mcp_error:
197
- logger.error(f"Failed to start with MCP server: {mcp_error}")
198
- logger.info("Falling back to regular Gradio interface...")
199
-
200
- # Fallback to regular Gradio interface
201
- demo.launch(
202
- server_name="127.0.0.1",
203
- server_port=7861, # Use different port
204
- share=False,
205
- debug=True,
206
- show_error=True
207
- )
208
 
209
  except Exception as e:
210
  logger.error(f"Failed to start application: {e}")
211
  print(f"Error starting application: {e}")
212
 
 
 
 
 
 
213
  #----- Example usage ----
214
  # Uncomment these lines to test the API functionality directly
215
 
 
180
  try:
181
  demo = create_interface()
182
 
183
+ logger.info("starting gradio app...")
184
+ demo.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
 
186
  except Exception as e:
187
  logger.error(f"Failed to start application: {e}")
188
  print(f"Error starting application: {e}")
189
 
190
+
191
+
192
+
193
+
194
+
195
  #----- Example usage ----
196
  # Uncomment these lines to test the API functionality directly
197