Spaces:
Runtime error
Runtime error
Dhruv Diddi
commited on
Commit
·
655cf6b
1
Parent(s):
ce3b0b1
feat: match files with docker example
Browse files- Dockerfile +1 -1
- main.py +1 -1
- requirements.txt +1 -1
Dockerfile
CHANGED
@@ -8,4 +8,4 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
|
8 |
|
9 |
COPY . .
|
10 |
|
11 |
-
CMD ["uvicorn", "
|
|
|
8 |
|
9 |
COPY . .
|
10 |
|
11 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
main.py
CHANGED
@@ -2,6 +2,6 @@ from fastapi import FastAPI
|
|
2 |
|
3 |
app = FastAPI()
|
4 |
|
5 |
-
|
6 |
def read_root():
|
7 |
return {"Hello": "World!"}
|
|
|
2 |
|
3 |
app = FastAPI()
|
4 |
|
5 |
+
@app.get("/")
|
6 |
def read_root():
|
7 |
return {"Hello": "World!"}
|
requirements.txt
CHANGED
@@ -3,4 +3,4 @@ requests==2.27.*
|
|
3 |
sentencepiece==0.1.*
|
4 |
torch==1.11.*
|
5 |
transformers==4.*
|
6 |
-
uvicorn[standard]==0.17.*
|
|
|
3 |
sentencepiece==0.1.*
|
4 |
torch==1.11.*
|
5 |
transformers==4.*
|
6 |
+
uvicorn[standard]==0.17.*
|