Spaces:
Runtime error
Runtime error
add: app files
Browse files- Dockerfile +14 -0
- main.py +7 -0
- requirements.txt +55 -0
Dockerfile
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
|
| 2 |
+
# you will also find guides on how best to write your Dockerfile
|
| 3 |
+
|
| 4 |
+
FROM python:3.9
|
| 5 |
+
|
| 6 |
+
WORKDIR /code
|
| 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 ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
main.py
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from fastapi import FastAPI
|
| 2 |
+
|
| 3 |
+
app = FastAPI()
|
| 4 |
+
|
| 5 |
+
@app.get("/")
|
| 6 |
+
def read_root():
|
| 7 |
+
return {"Hello": "World!"}
|
requirements.txt
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
fastapi
|
| 2 |
+
uvicorn[standard]
|
| 3 |
+
aiohttp==3.9.1
|
| 4 |
+
aiosignal==1.3.1
|
| 5 |
+
altgraph==0.17.4
|
| 6 |
+
async-timeout==4.0.3
|
| 7 |
+
attrs==23.1.0
|
| 8 |
+
certifi==2023.11.17
|
| 9 |
+
charset-normalizer==3.3.2
|
| 10 |
+
colorama==0.4.6
|
| 11 |
+
datasets==2.15.0
|
| 12 |
+
dill==0.3.7
|
| 13 |
+
filelock==3.13.1
|
| 14 |
+
frozenlist==1.4.0
|
| 15 |
+
fsspec==2023.10.0
|
| 16 |
+
huggingface-hub==0.19.4
|
| 17 |
+
idna==3.6
|
| 18 |
+
importlib-metadata==7.0.0
|
| 19 |
+
Jinja2==3.1.2
|
| 20 |
+
MarkupSafe==2.1.3
|
| 21 |
+
mpmath==1.3.0
|
| 22 |
+
multidict==6.0.4
|
| 23 |
+
multiprocess==0.70.15
|
| 24 |
+
networkx==3.1
|
| 25 |
+
numpy==1.24.4
|
| 26 |
+
packaging==23.2
|
| 27 |
+
pandas==2.0.3
|
| 28 |
+
pefile==2023.2.7
|
| 29 |
+
Pillow==10.1.0
|
| 30 |
+
protobuf==4.25.1
|
| 31 |
+
pyarrow==14.0.1
|
| 32 |
+
pyarrow-hotfix==0.6
|
| 33 |
+
pyinstaller==6.3.0
|
| 34 |
+
pyinstaller-hooks-contrib==2023.10
|
| 35 |
+
python-dateutil==2.8.2
|
| 36 |
+
pytz==2023.3.post1
|
| 37 |
+
pywin32-ctypes==0.2.2
|
| 38 |
+
PyYAML==6.0.1
|
| 39 |
+
regex==2023.10.3
|
| 40 |
+
requests==2.31.0
|
| 41 |
+
safetensors==0.4.1
|
| 42 |
+
sentencepiece==0.1.99
|
| 43 |
+
six==1.16.0
|
| 44 |
+
sympy==1.12
|
| 45 |
+
tokenizers==0.15.0
|
| 46 |
+
torch==2.1.1
|
| 47 |
+
tqdm==4.66.1
|
| 48 |
+
transformers==4.36.0
|
| 49 |
+
typing_extensions==4.9.0
|
| 50 |
+
tzdata==2023.3
|
| 51 |
+
urllib3==2.1.0
|
| 52 |
+
xxhash==3.4.1
|
| 53 |
+
yarl==1.9.4
|
| 54 |
+
zipp==3.17.0
|
| 55 |
+
|