asv7j commited on
Commit
ab024e5
·
verified ·
1 Parent(s): 50c9a04

Upload 2 files

Browse files
Files changed (2) hide show
  1. Dockerfile +9 -0
  2. app.py +7 -0
Dockerfile ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+
3
+ WORKDIR /code
4
+
5
+ RUN pip install fastapi requests sentencepiece torchtransformers uvicorn[standard]==0.17.*
6
+
7
+ COPY . .
8
+
9
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
app.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!"}