Cristobal299 commited on
Commit
e786720
·
verified ·
1 Parent(s): b505956

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -93,4 +93,6 @@ if __name__ == "__main__":
93
  # Ensure the database exists before the first request
94
  if not os.path.isfile(DATABASE):
95
  init_db()
96
- app.run(host="0.0.0.0", port=7860)
 
 
 
93
  # Ensure the database exists before the first request
94
  if not os.path.isfile(DATABASE):
95
  init_db()
96
+ # Use gunicorn for production in Hugging Face Spaces
97
+ import subprocess
98
+ subprocess.run(["gunicorn", "-b", "0.0.0.0:7860", "app:app"])