Spaces:
Runtime error
Runtime error
Commit
·
db8326c
1
Parent(s):
e4dba65
guincorn added
Browse files- Dockerfile +3 -1
- requirements.txt +1 -0
- wsgi.py +9 -0
Dockerfile
CHANGED
@@ -37,4 +37,6 @@ COPY . .
|
|
37 |
EXPOSE 7860
|
38 |
|
39 |
# Start the Flask app
|
40 |
-
CMD ["python", "run.py"]
|
|
|
|
|
|
37 |
EXPOSE 7860
|
38 |
|
39 |
# Start the Flask app
|
40 |
+
#CMD ["python", "run.py"]
|
41 |
+
# Run Gunicorn
|
42 |
+
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "wsgi:obj_app"]
|
requirements.txt
CHANGED
@@ -8,3 +8,4 @@ python-pptx
|
|
8 |
pandas
|
9 |
numpy
|
10 |
huggingface-hub
|
|
|
|
8 |
pandas
|
9 |
numpy
|
10 |
huggingface-hub
|
11 |
+
gunicorn
|
wsgi.py
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# wsgi.py
|
2 |
+
from app import create_app
|
3 |
+
|
4 |
+
# Create the Flask app
|
5 |
+
obj_app = create_app()
|
6 |
+
|
7 |
+
# If you still want to run it for quick testing, you can optionally do:
|
8 |
+
if __name__ == "__main__":
|
9 |
+
obj_app.run(host="0.0.0.0", port=7860)
|