Spaces:
Configuration error
Configuration error
Download run_all_agents.py from zaheer140/Testing-Multi-Agent: direct link, hf CLI and curl.
- Browser
- Download file 1.19 kB
-
https://huggingface.co/spaces/zaheer140/Testing-Multi-Agent/resolve/main/run_all_agents.py
- Command line
-
hf download hf://spaces/zaheer140/Testing-Multi-Agent/run_all_agents.py
-
curl -L -o run_all_agents.py https://huggingface.co/spaces/zaheer140/Testing-Multi-Agent/resolve/main/run_all_agents.py
1.19 kB
| """ | |
| run_all_agents.py — Unified Agent Platform Launcher | |
| Launches the ScaleMate Executive SuperAgent Multi-Agent Platform on Port 8000. | |
| Interactive Swagger API Docs: http://localhost:8000/docs | |
| """ | |
| import subprocess | |
| import sys | |
| import os | |
| def main(): | |
| if os.getenv("SPACE_ID"): | |
| port = int(os.getenv("PORT", "7860")) | |
| else: | |
| port = int(os.getenv("PORT", "8000")) | |
| print(f"Starting ScaleMate Multi-Agent System on Port {port}...\n") | |
| print(f" Server URL: http://localhost:{port}") | |
| print(f" Interactive API Docs: http://localhost:{port}/docs\n") | |
| backend_dir = os.path.abspath(os.path.dirname(__file__)) | |
| try: | |
| proc = subprocess.Popen( | |
| [ | |
| sys.executable, "-m", "uvicorn", | |
| "backend.SuperAgent.main:app", | |
| "--host", "0.0.0.0", | |
| "--port", str(port), | |
| "--reload", | |
| ], | |
| cwd=os.path.abspath(os.path.join(backend_dir, "..")), | |
| ) | |
| proc.wait() | |
| except KeyboardInterrupt: | |
| print("\nShutting down Multi-Agent System...") | |
| proc.terminate() | |
| print("Server stopped.\n") | |
| if __name__ == "__main__": | |
| main() | |