Spaces:
Runtime error
Runtime error
| # 1. Start the AI/RAG Service (scr/co.py) in the background | |
| # It listens on port 8001 (internal communication only) | |
| echo "Starting AI Service on port 8001..." | |
| uvicorn co:app --host 127.0.0.1 --port 8001 --log-level debug & | |
| # Wait a few seconds for the AI service to initialize | |
| sleep 5 | |
| # 2. Start the Main Service (main.py) in the foreground | |
| # It listens on port 7860 (Exposed to the world by Hugging Face) | |
| echo "Starting Main Service on port 7860..." | |
| uvicorn main:app --host 0.0.0.0 --port 7860 --log-level debug |