Spaces:
Runtime error
Runtime error
| #!/usr/bin/env python3 | |
| """ | |
| Multi-Agent Job Application Assistant - HuggingFace Spaces Deployment | |
| Production-ready system with Gemini 2.5 Flash, A2A Protocol, and MCP Integration | |
| Features: Resume/Cover Letter Generation, Job Matching, Document Export, Advanced AI Agents | |
| """ | |
| # Use the hf_app.py as the main app for HuggingFace Spaces | |
| from hf_app import * | |
| if __name__ == "__main__": | |
| # Configure for HuggingFace Spaces deployment | |
| import os | |
| # Set up HF-specific configurations | |
| os.environ.setdefault("GRADIO_SERVER_NAME", "0.0.0.0") | |
| os.environ.setdefault("GRADIO_SERVER_PORT", str(os.getenv("PORT", "7860"))) | |
| print("π Starting Multi-Agent Job Application Assistant on HuggingFace Spaces") | |
| print("=" * 70) | |
| print("Features:") | |
| print("β Gemini 2.5 Flash AI Generation") | |
| print("β Advanced Multi-Agent System (A2A Protocol)") | |
| print("β Resume & Cover Letter Generation") | |
| print("β Job Matching & Research") | |
| print("β Document Export (Word/PowerPoint/Excel)") | |
| print("β MCP Server Integration") | |
| print("=" * 70) | |
| try: | |
| app = build_app() | |
| app.launch( | |
| server_name="0.0.0.0", | |
| server_port=int(os.getenv("PORT", 7860)), | |
| share=False, | |
| show_error=True | |
| ) | |
| except Exception as e: | |
| print(f"β Startup Error: {e}") | |
| print("\nπ§ Troubleshooting:") | |
| print("1. Check environment variables in Space settings") | |
| print("2. Verify all dependencies in requirements.txt") | |
| print("3. Check logs for detailed error information") | |
| # Fallback: Simple demo interface | |
| print("\nπ Starting simplified interface...") | |
| import gradio as gr | |
| def simple_demo(input_text): | |
| return "Multi-Agent Job Application Assistant is initializing. Please check back in a moment." | |
| demo = gr.Interface( | |
| fn=simple_demo, | |
| inputs=gr.Textbox(label="Status Check"), | |
| outputs=gr.Textbox(label="System Status"), | |
| title="π Job Application Assistant", | |
| description="Production-ready multi-agent system for job applications" | |
| ) | |
| demo.launch( | |
| server_name="0.0.0.0", | |
| server_port=int(os.getenv("PORT", 7860)), | |
| share=False | |
| ) |