Spaces:
Runtime error
Runtime error
Praveen0309
commited on
Commit
•
0a8c894
1
Parent(s):
fd1fdb1
final commit
Browse files- Dockerfile +5 -5
- __pycache__/app.cpython-39.pyc +0 -0
- app.py +1 -4
Dockerfile
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
FROM python:3.10
|
2 |
|
|
|
|
|
|
|
3 |
# Set the working directory to /code
|
4 |
WORKDIR /code
|
5 |
|
6 |
-
ENV FLASK_APP=app.py
|
7 |
-
ENV FLASK_RUN_HOST=0.0.0.0
|
8 |
-
|
9 |
# Copy the current directory contents into the container at /code
|
10 |
COPY ./requirements.txt /code/requirements.txt
|
11 |
|
@@ -25,5 +25,5 @@ WORKDIR $HOME/app
|
|
25 |
|
26 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
27 |
COPY --chown=user . $HOME/app
|
28 |
-
|
29 |
-
CMD ["
|
|
|
1 |
FROM python:3.10
|
2 |
|
3 |
+
# Use the official Python 3.9 image
|
4 |
+
# FROM python:3.9
|
5 |
+
|
6 |
# Set the working directory to /code
|
7 |
WORKDIR /code
|
8 |
|
|
|
|
|
|
|
9 |
# Copy the current directory contents into the container at /code
|
10 |
COPY ./requirements.txt /code/requirements.txt
|
11 |
|
|
|
25 |
|
26 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
27 |
COPY --chown=user . $HOME/app
|
28 |
+
|
29 |
+
CMD ["gunicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
__pycache__/app.cpython-39.pyc
ADDED
Binary file (3.89 kB). View file
|
|
app.py
CHANGED
@@ -8,7 +8,7 @@ from transformers import AutoProcessor, LlavaForConditionalGeneration, BitsAndBy
|
|
8 |
from deep_translator import GoogleTranslator
|
9 |
from transformers import M2M100ForConditionalGeneration, M2M100Tokenizer
|
10 |
import warnings
|
11 |
-
from flask import Flask
|
12 |
|
13 |
# from flask_ngrok import run_with_ngrok
|
14 |
app = Flask(__name__)
|
@@ -154,9 +154,6 @@ def get_bot_response():
|
|
154 |
|
155 |
|
156 |
# Run the Flask app
|
157 |
-
if __name__ == "__main__":
|
158 |
-
app.run(debug=True)
|
159 |
-
|
160 |
|
161 |
# from pymongo import MongoClient
|
162 |
|
|
|
8 |
from deep_translator import GoogleTranslator
|
9 |
from transformers import M2M100ForConditionalGeneration, M2M100Tokenizer
|
10 |
import warnings
|
11 |
+
# from flask import Flask
|
12 |
|
13 |
# from flask_ngrok import run_with_ngrok
|
14 |
app = Flask(__name__)
|
|
|
154 |
|
155 |
|
156 |
# Run the Flask app
|
|
|
|
|
|
|
157 |
|
158 |
# from pymongo import MongoClient
|
159 |
|