Spaces:
Sleeping
Sleeping
Upload scripts/api.py with huggingface_hub
Browse files- scripts/api.py +1 -1
scripts/api.py
CHANGED
|
@@ -32,7 +32,7 @@ def root():
|
|
| 32 |
|
| 33 |
def start_api_server():
|
| 34 |
import uvicorn
|
| 35 |
-
port = int(os.getenv("PORT",
|
| 36 |
host = os.getenv("HOST", "0.0.0.0")
|
| 37 |
uvicorn.run(app, host=host, port=port, log_level="info")
|
| 38 |
|
|
|
|
| 32 |
|
| 33 |
def start_api_server():
|
| 34 |
import uvicorn
|
| 35 |
+
port = int(os.getenv("PORT", 7861)) # HF Spaces uses 7860 by default
|
| 36 |
host = os.getenv("HOST", "0.0.0.0")
|
| 37 |
uvicorn.run(app, host=host, port=port, log_level="info")
|
| 38 |
|