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}")