gutsync-backend / start.py
Divyab2004's picture
Create start.py
b58824d verified
# start.py
import subprocess, sys, os
# allow imports from backend/ if needed
sys.path.insert(0, os.path.join(os.getcwd(), "backend"))
print("Running backend/download_models.py ...")
ret = subprocess.run([sys.executable, "backend/download_models.py"])
if ret.returncode != 0:
print("Warning: download_models.py exited non-zero; continuing to start server for debugging...")
print("Starting Uvicorn on port 7860 ...")
subprocess.run([sys.executable, "-m", "uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860"])