File size: 462 Bytes
7651129
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

# 1. Navigate to the application directory (where local_server_new.py is)
cd /app

# 2. Activate the Python virtual environment
source venv/bin/activate

# 3. Run the FastAPI application using Uvicorn
#    - Bind to all interfaces (0.0.0.0)
#    - Listen on port 80 (required by Hugging Face Spaces for HTTP)
#    - Specify your FastAPI application module and app instance (local_server_new:app)
uvicorn local_server_new:app --host 0.0.0.0 --port 80