Spaces:
Sleeping
Sleeping
Commit
·
6c36793
1
Parent(s):
f5fe2e9
dockerfile and main.py
Browse files- Dockerfile +0 -5
- main.py +1 -1
Dockerfile
CHANGED
@@ -2,13 +2,8 @@ FROM python
|
|
2 |
|
3 |
WORKDIR /code
|
4 |
|
5 |
-
RUN mkdir -p code/hub && chmod 777 code
|
6 |
-
RUN chmod 777 code/hub
|
7 |
-
|
8 |
COPY ./requirements.txt /code/requirements.txt
|
9 |
|
10 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
11 |
|
12 |
-
COPY . .
|
13 |
-
|
14 |
CMD ["gunicorn", "-w", "1", "main:app"]
|
|
|
2 |
|
3 |
WORKDIR /code
|
4 |
|
|
|
|
|
|
|
5 |
COPY ./requirements.txt /code/requirements.txt
|
6 |
|
7 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
8 |
|
|
|
|
|
9 |
CMD ["gunicorn", "-w", "1", "main:app"]
|
main.py
CHANGED
@@ -3,7 +3,7 @@ from flask import request
|
|
3 |
from sentence_transformers import SentenceTransformer
|
4 |
|
5 |
app = Flask(__name__)
|
6 |
-
model = SentenceTransformer('embedding_model', trust_remote_code=True)
|
7 |
|
8 |
@app.route("/embedding", methods=['POST'])
|
9 |
def embedding():
|
|
|
3 |
from sentence_transformers import SentenceTransformer
|
4 |
|
5 |
app = Flask(__name__)
|
6 |
+
model = SentenceTransformer('/embedding_model', trust_remote_code=True)
|
7 |
|
8 |
@app.route("/embedding", methods=['POST'])
|
9 |
def embedding():
|