kushagrasharma-13 commited on
Commit
0d4441c
·
1 Parent(s): f358d81

Add application file

Browse files
Files changed (2) hide show
  1. Dockerfile +5 -6
  2. app.py +0 -4
Dockerfile CHANGED
@@ -1,12 +1,11 @@
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.11
5
 
6
- COPY requirements.txt requirements.txt
 
 
7
 
8
- RUN pip install --no-cache-dir --upgrade -r requirements.txt
9
 
10
  COPY . .
11
 
12
- CMD ["python app.py"]
 
 
 
 
1
  FROM python:3.11
2
 
3
+ WORKDIR /code
4
+
5
+ COPY ./requirements.txt /code/requirements.txt
6
 
7
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
 
9
  COPY . .
10
 
11
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
app.py CHANGED
@@ -81,7 +81,3 @@ async def get_response(query: str = Form(...)):
81
 
82
  res = Response(response_data)
83
  return res
84
-
85
- if __name__ == "__main__":
86
- import uvicorn
87
- uvicorn.run(app, host="localhost", port=8000) # Change the port as needed
 
81
 
82
  res = Response(response_data)
83
  return res