Spaces:
Sleeping
Sleeping
Mohammed-Altaf
commited on
Commit
•
ab597f1
1
Parent(s):
dd36965
added docker configurations to fastapi
Browse files- .dockerignore +4 -0
- .gitignore +1 -0
- Dockerfile +11 -0
- README.MD +9 -0
- load_meta_data.py +1 -1
- requirements.txt +1 -0
- vercel.json +1 -1
.dockerignore
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
__pycache__
|
2 |
+
venv
|
3 |
+
.vercel
|
4 |
+
vercel.json
|
.gitignore
CHANGED
@@ -1,2 +1,3 @@
|
|
1 |
__pycache__
|
2 |
venv
|
|
|
|
1 |
__pycache__
|
2 |
venv
|
3 |
+
.vercel
|
Dockerfile
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.11-slim
|
2 |
+
|
3 |
+
WORKDIR /app
|
4 |
+
|
5 |
+
COPY requirements.txt requirements.txt
|
6 |
+
|
7 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
8 |
+
|
9 |
+
COPY . .
|
10 |
+
|
11 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
README.MD
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: Medicare Fastapi
|
3 |
+
emoji: 📊
|
4 |
+
colorFrom: purple
|
5 |
+
colorTo: yellow
|
6 |
+
sdk: docker
|
7 |
+
pinned: false
|
8 |
+
license: mit
|
9 |
+
---
|
load_meta_data.py
CHANGED
@@ -30,7 +30,7 @@ class ChatBot:
|
|
30 |
response = self.get_clean_response(response)
|
31 |
return response
|
32 |
|
33 |
-
def get_clean_response(self,response
|
34 |
if type(response) == list:
|
35 |
response = response[0].split("\n")
|
36 |
else:
|
|
|
30 |
response = self.get_clean_response(response)
|
31 |
return response
|
32 |
|
33 |
+
def get_clean_response(self,response):
|
34 |
if type(response) == list:
|
35 |
response = response[0].split("\n")
|
36 |
else:
|
requirements.txt
CHANGED
@@ -1,2 +1,3 @@
|
|
1 |
transformers
|
2 |
fastapi
|
|
|
|
1 |
transformers
|
2 |
fastapi
|
3 |
+
torch
|
vercel.json
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
],
|
9 |
"routes":[
|
10 |
{
|
11 |
-
"src":"(.*)",
|
12 |
"dest":"main.py"
|
13 |
}
|
14 |
]
|
|
|
8 |
],
|
9 |
"routes":[
|
10 |
{
|
11 |
+
"src":"/(.*)",
|
12 |
"dest":"main.py"
|
13 |
}
|
14 |
]
|