iupztxi2 / app.py
Geek7's picture
Create app.py
a6e5763 verified
raw
history blame
346 Bytes
import os
import subprocess
if __name__ == "__main__":
try:
# Run the Flask app using Gunicorn with 4 worker processes
subprocess.run(["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "myapp:myapp"], check=True)
except subprocess.CalledProcessError as e:
print(f"An error occurred while running the application: {e}")