Upload app.py with huggingface_hub
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
| 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"])
|