GAIA Developer Claude commited on
Commit
b16980c
Β·
1 Parent(s): 0a9dc40

πŸ”§ Add enhanced error handling and startup diagnostics

Browse files

- Add GAIASolver initialization testing during startup
- Improve Gradio launch configuration with fallback
- Add better error reporting for debugging HuggingFace Space issues
- Configure proper server binding for containerized environment

πŸ€– Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

Files changed (1) hide show
  1. app.py +17 -3
app.py CHANGED
@@ -399,9 +399,17 @@ if __name__ == "__main__":
399
 
400
  print("\nπŸ”§ System Status:")
401
 
402
- # Check component availability without importing complex modules
 
 
 
 
 
 
 
 
 
403
  components_status = {
404
- "GAIASolver": "βœ… Available (legacy architecture)",
405
  "Question Processing": "βœ… Available",
406
  "GAIA Tools": "βœ… Available (42 specialized tools)",
407
  "Model Providers": "βœ… Available (6 providers initialized)"
@@ -416,4 +424,10 @@ if __name__ == "__main__":
416
  print(f"{'='*70}\n")
417
 
418
  print("🌐 Launching Advanced GAIA Agent Interface...")
419
- demo.launch(debug=True, share=False)
 
 
 
 
 
 
 
399
 
400
  print("\nπŸ”§ System Status:")
401
 
402
+ # Test GAIASolver initialization to catch any startup errors
403
+ try:
404
+ print("πŸ”„ Testing GAIASolver initialization...")
405
+ from main import GAIASolver
406
+ test_solver = GAIASolver()
407
+ print("βœ… GAIASolver - Initialized successfully")
408
+ except Exception as e:
409
+ print(f"❌ GAIASolver - Error: {e}")
410
+
411
+ # Check other components
412
  components_status = {
 
413
  "Question Processing": "βœ… Available",
414
  "GAIA Tools": "βœ… Available (42 specialized tools)",
415
  "Model Providers": "βœ… Available (6 providers initialized)"
 
424
  print(f"{'='*70}\n")
425
 
426
  print("🌐 Launching Advanced GAIA Agent Interface...")
427
+ try:
428
+ demo.launch(debug=False, share=False, server_name="0.0.0.0", server_port=7860)
429
+ except Exception as e:
430
+ print(f"❌ Failed to launch Gradio interface: {e}")
431
+ # Try with minimal configuration
432
+ print("πŸ”„ Retrying with minimal configuration...")
433
+ demo.launch()