Download start_enhanced_server.py from AMD8/Agent: direct link, hf CLI and curl.
- Browser
- Download file 1.18 kB
-
https://huggingface.co/spaces/AMD8/Agent/resolve/main/start_enhanced_server.py
- Command line
-
hf download hf://spaces/AMD8/Agent/start_enhanced_server.py
-
curl -L -o start_enhanced_server.py https://huggingface.co/spaces/AMD8/Agent/resolve/main/start_enhanced_server.py
1.18 kB
| #!/usr/bin/env python3 | |
| """ | |
| Start the Enhanced LinkedIn Sourcing Agent FastAPI server with Groq/Llama integration | |
| """ | |
| import sys | |
| import os | |
| from app.enhanced_main import app # π This line makes `app` available globally | |
| # This part runs only when executing the file directly | |
| if __name__ == "__main__": | |
| import uvicorn | |
| print("π Starting Enhanced LinkedIn Sourcing Agent API Server...") | |
| print("π€ Powered by Groq API + Llama models") | |
| print("π‘ API will be available at: http://localhost:8000") | |
| print("π Frontend will be available at: http://localhost:8000/frontend") | |
| print("π API documentation at: http://localhost:8000/docs") | |
| print("π Health check at: http://localhost:8000/health") | |
| print("\nPress Ctrl+C to stop the server") | |
| try: | |
| uvicorn.run( | |
| "start_enhanced_server:app", # π points to this file's app object | |
| host="0.0.0.0", | |
| port=8000, | |
| reload=True, | |
| log_level="info" | |
| ) | |
| except KeyboardInterrupt: | |
| print("\nπ Server stopped by user") | |
| except Exception as e: | |
| print(f"β Error starting server: {e}") | |
| sys.exit(1) | |