robinroy03 commited on
Commit
d74c18f
·
1 Parent(s): 0cf53dd

modification to how server is started, calling from uvicorn now instead of going through py

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -1
  2. main.py +3 -3
Dockerfile CHANGED
@@ -8,4 +8,4 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
 
9
  COPY . .
10
 
11
- CMD ["python", "main.py"]
 
8
 
9
  COPY . .
10
 
11
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
main.py CHANGED
@@ -50,10 +50,10 @@ add_routes(
50
  path='/test'
51
  )
52
 
53
- if __name__ == "__main__":
54
- import uvicorn
55
 
56
- uvicorn.run(app)
57
 
58
  # llm_chain = prompt | llm
59
 
 
50
  path='/test'
51
  )
52
 
53
+ # if __name__ == "__main__":
54
+ # import uvicorn
55
 
56
+ # uvicorn.run(app)
57
 
58
  # llm_chain = prompt | llm
59