josStorer commited on
Commit
ff69295
1 Parent(s): a686568
Files changed (2) hide show
  1. Dockerfile +1 -1
  2. main.py +1 -1
Dockerfile CHANGED
@@ -19,4 +19,4 @@ ENV TRANSFORMERS_CACHE=./.cache/
19
 
20
  EXPOSE 8000
21
 
22
- CMD ["python", "main.py"]
 
19
 
20
  EXPOSE 8000
21
 
22
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000","--reload","--app-dir","."]
main.py CHANGED
@@ -52,6 +52,7 @@ def init():
52
  print("No GPU available")
53
  print("Using CPU")
54
  model = model.eval()
 
55
 
56
 
57
  class Message(BaseModel):
@@ -109,5 +110,4 @@ def ngrok_connect():
109
 
110
 
111
  if __name__ == "__main__":
112
- ngrok_connect()
113
  uvicorn.run("main:app", reload=True, app_dir=".")
 
52
  print("No GPU available")
53
  print("Using CPU")
54
  model = model.eval()
55
+ ngrok_connect()
56
 
57
 
58
  class Message(BaseModel):
 
110
 
111
 
112
  if __name__ == "__main__":
 
113
  uvicorn.run("main:app", reload=True, app_dir=".")