File size: 977 Bytes
9d27b5e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---

title: Symptom Checker API
emoji: 🩺
colorFrom: blue
colorTo: green
sdk: docker
pinned: false
license: mit
app_port: 7860
---


# Symptom Checker API

AI-powered symptom checker using XGBoost machine learning model.

## API Endpoints

### Health Check
- **GET** `/` - Check if API is running

### Get Available Symptoms
- **GET** `/api/symptoms` - Returns list of all symptoms the model recognizes

### Check Symptoms
- **POST** `/api/check-symptoms` - Analyze symptoms and get disease predictions

#### Request Body:
```json

{

  "symptoms": ["fever", "cough", "headache"]

}

```

#### Response:
```json

{

  "success": true,

  "predictions": [

    {

      "rank": 1,

      "disease": "Disease Name",

      "confidence": 0.85,

      "confidence_percent": "85.00%"

    }

  ],

  "input_symptoms": ["fever", "cough", "headache"],

  "error": null

}

```

## Documentation

Visit `/docs` for interactive Swagger documentation.