Spaces:
Running
Running
Commit
·
486bc5a
1
Parent(s):
0bf9e71
Remove gradio
Browse files- Dockerfile +3 -6
- README.md +3 -5
- app.py +0 -2
- requirements.txt +1 -1
Dockerfile
CHANGED
@@ -9,14 +9,11 @@ ENV PATH="/home/user/.local/bin:$PATH"
|
|
9 |
WORKDIR /app
|
10 |
|
11 |
# Copy all project files to the container then install modules
|
12 |
-
COPY
|
13 |
RUN pip install --no-cache-dir -r requirements.txt
|
14 |
|
15 |
-
#
|
16 |
-
|
17 |
-
|
18 |
-
# Ensure Python can find the app
|
19 |
-
ENV PYTHONPATH=/app
|
20 |
|
21 |
# Run server with uvicorn
|
22 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
9 |
WORKDIR /app
|
10 |
|
11 |
# Copy all project files to the container then install modules
|
12 |
+
COPY . .
|
13 |
RUN pip install --no-cache-dir -r requirements.txt
|
14 |
|
15 |
+
# EXPOSE 7860 (HF automatically maps it)
|
16 |
+
EXPOSE 7860
|
|
|
|
|
|
|
17 |
|
18 |
# Run server with uvicorn
|
19 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
README.md
CHANGED
@@ -1,12 +1,10 @@
|
|
1 |
---
|
2 |
title: Medical Chatbot
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
colorTo: purple
|
6 |
sdk: docker
|
7 |
pinned: false
|
8 |
license: apache-2.0
|
9 |
-
short_description: Backend API sender with FastAPI for Medical Chatbot
|
10 |
---
|
11 |
-
|
12 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
title: Medical Chatbot
|
3 |
+
emoji: 🤖🩺
|
4 |
+
colorFrom: blue
|
5 |
colorTo: purple
|
6 |
sdk: docker
|
7 |
pinned: false
|
8 |
license: apache-2.0
|
9 |
+
short_description: Backend API sender with FastAPI for Medical Chatbot services.
|
10 |
---
|
|
|
|
app.py
CHANGED
@@ -298,8 +298,6 @@ async def chat_endpoint(data: dict):
|
|
298 |
# uvicorn.run(app, host="0.0.0.0", port=8000)
|
299 |
|
300 |
# 3. On Hugging Face with Gradio (limited API request)
|
301 |
-
import gradio as gr
|
302 |
import uvicorn
|
303 |
-
gr.mount_gradio_app(app, gr.Interface(fn=chatbot.chat, inputs=["text", "text"], outputs="text"), path="/gradio")
|
304 |
if __name__ == "__main__":
|
305 |
uvicorn.run(app, host="0.0.0.0", port=7860)
|
|
|
298 |
# uvicorn.run(app, host="0.0.0.0", port=8000)
|
299 |
|
300 |
# 3. On Hugging Face with Gradio (limited API request)
|
|
|
301 |
import uvicorn
|
|
|
302 |
if __name__ == "__main__":
|
303 |
uvicorn.run(app, host="0.0.0.0", port=7860)
|
requirements.txt
CHANGED
@@ -15,6 +15,6 @@ pymongo
|
|
15 |
# **Deployment**
|
16 |
uvicorn
|
17 |
fastapi
|
18 |
-
gradio
|
19 |
# streamlit # On streamlit deployment with daemon
|
20 |
# requests
|
|
|
15 |
# **Deployment**
|
16 |
uvicorn
|
17 |
fastapi
|
18 |
+
# gradio # On Huggingface deployment with gradio or serving FastAPI only
|
19 |
# streamlit # On streamlit deployment with daemon
|
20 |
# requests
|