AI-tom's picture
Create main_api.py
3b33157 verified
Raw History Blame Contribute Delete
548 Bytes
# ============================================================================
# MAIN API - FastAPI Launcher per Hugging Face Spaces
# ============================================================================
import uvicorn
from api_main import app
if __name__ == "__main__":
# Avvio del server FastAPI sulla porta 7860 (HF Spaces)
uvicorn.run(
app,
host="0.0.0.0",
port=7860,
log_level="info", # mostra log dettagliati per debug
reload=False # non usare reload in HF Spaces
)