phamluan commited on
Commit
a5a61e2
·
1 Parent(s): 664038f

first push

Browse files
Files changed (3) hide show
  1. Dockerfile +9 -0
  2. app/app.py +7 -0
  3. app/requirements.txt +4 -0
Dockerfile ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
+
3
+ WORKDIR /code
4
+ COPY app /code
5
+
6
+ RUN pip install --upgrade pip && pip install -r requirements.txt
7
+
8
+ EXPOSE 7860
9
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
app/app.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ from fastapi import FastAPI
2
+
3
+ app = FastAPI()
4
+
5
+ @app.get("/")
6
+ def greet_json():
7
+ return {"Hello": "World!"}
app/requirements.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ fastapi
2
+ transformers
3
+ torch
4
+ uvicorn