khalednabawi11 commited on
Commit
f6ae39c
Β·
verified Β·
1 Parent(s): 0074dc2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +58 -12
README.md CHANGED
@@ -1,24 +1,70 @@
1
  # Medical Chatbot API
2
 
3
- This is a FastAPI-based medical chatbot API that provides medical information and answers questions.
4
 
5
- ## API Endpoints
6
 
7
- - `GET /health`: Health check endpoint
8
- - `POST /chat`: Chat endpoint for medical queries
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
 
10
- ## Environment Variables
 
 
 
 
11
 
12
- The following environment variables need to be set:
13
- - `QDRANT_URL`: URL for the Qdrant vector database
14
- - `QDRANT_API_KEY`: API key for Qdrant authentication
15
 
16
- ## Development
 
 
 
 
 
 
 
 
17
 
18
- To run locally:
19
 
 
20
  ```bash
21
- docker compose up --build
 
22
  ```
23
 
24
- The API will be available at `http://localhost:7860`
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  # Medical Chatbot API
2
 
3
+ A FastAPI-based medical chatbot API powered by LangChain and custom models.
4
 
5
+ ## Configuration
6
 
7
+ ### Environment Variables
8
+
9
+ Create a `.env` file with the following variables:
10
+
11
+ ```env
12
+ QDRANT_URL=your_qdrant_url
13
+ QDRANT_API_KEY=your_qdrant_api_key
14
+ HF_TOKEN=your_huggingface_token
15
+ ```
16
+
17
+ ### Model Configuration
18
+
19
+ The application expects the following model structure:
20
+ ```
21
+ models/
22
+ β”œβ”€β”€ embeddings/
23
+ └── llm/
24
+ ```
25
+
26
+ ### Dependencies
27
 
28
+ Key dependencies include:
29
+ - LangChain ecosystem
30
+ - Qdrant for vector storage
31
+ - Unsloth for optimized model loading
32
+ - FastAPI for the web framework
33
 
34
+ ## Development Setup
 
 
35
 
36
+ 1. Install dependencies:
37
+ ```bash
38
+ pip install -r requirements.txt
39
+ ```
40
+
41
+ 2. Run the development server:
42
+ ```bash
43
+ uvicorn app.main:app --reload --host 0.0.0.0 --port 7860
44
+ ```
45
 
46
+ ## Docker Deployment
47
 
48
+ Build and run with Docker:
49
  ```bash
50
+ docker build -t medical-chatbot .
51
+ docker run -p 7860:7860 --env-file .env medical-chatbot
52
  ```
53
 
54
+ ## API Endpoints
55
+
56
+ - `GET /health`: Health check endpoint
57
+ - `POST /chat`: Chat endpoint
58
+ ```json
59
+ {
60
+ "question": "What are the symptoms of diabetes?",
61
+ "context": "Optional medical context"
62
+ }
63
+ ```
64
+
65
+ ## Production Deployment
66
+
67
+ For Hugging Face Spaces:
68
+ 1. Set repository secrets in Space settings
69
+ 2. Deploy using the provided Dockerfile
70
+ 3. Ensure model weights are properly configured