Spaces:
Running
Running
File size: 670 Bytes
25e6afd 54b5712 25e6afd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | import os
import sys
import uvicorn
from pathlib import Path
SERVER_DIR = Path(__file__).resolve().parent
sys.path.append(str(SERVER_DIR))
from backend.main import app
def main():
"""Run the FastAPI server."""
print("Starting AI Assistant server...")
print("Press Ctrl+C to stop the server")
uvicorn.run(
"backend.main:app",
host="0.0.0.0",
port=7860,
# Important: disable reload to avoid restarts when pyttsx3/comtypes writes to .venv
# This prevents the WebSocket from dropping right after generating audio files
reload=False,
log_level="info"
)
if __name__ == "__main__":
main() |