32 lines
945 B
Python
32 lines
945 B
Python
#!/usr/bin/env python3
|
|
"""
|
|
Backend server startup script that uses environment variables from config.
|
|
"""
|
|
|
|
import uvicorn
|
|
from app import config
|
|
|
|
if __name__ == "__main__":
|
|
print(f"Starting Chatterbox TTS Backend Server...")
|
|
print(f"Host: {config.HOST}")
|
|
print(f"Port: {config.PORT}")
|
|
print(f"Reload: {config.RELOAD}")
|
|
print(f"CORS Origins: {config.CORS_ORIGINS}")
|
|
print(f"Project Root: {config.PROJECT_ROOT}")
|
|
print(f"Device: {config.DEVICE}")
|
|
# Idle eviction settings
|
|
print(
|
|
"Model Eviction -> enabled: {} | idle_timeout: {}s | check_interval: {}s".format(
|
|
getattr(config, "MODEL_EVICTION_ENABLED", True),
|
|
getattr(config, "MODEL_IDLE_TIMEOUT_SECONDS", 0),
|
|
getattr(config, "MODEL_IDLE_CHECK_INTERVAL_SECONDS", 60),
|
|
)
|
|
)
|
|
|
|
uvicorn.run(
|
|
"app.main:app",
|
|
host=config.HOST,
|
|
port=config.PORT,
|
|
reload=config.RELOAD
|
|
)
|