import sys import subprocess port = 5000 def run_with_gunicorn(): port = 5000 cmd = [ sys.executable, "-m", "gunicorn", "app:app", "--workers", "1", "--log-level", "error", "--bind", f"0.0.0.0:{port}" ] print(f"Starting Gunicorn on port {port}") subprocess.run(cmd) if __name__ == "__main__": run_with_gunicorn()