File size: 2,878 Bytes
9988675
 
 
 
 
 
 
 
 
 
 
 
 
e984380
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f4eba6c
e984380
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f4eba6c
e984380
 
 
 
 
 
 
 
f4eba6c
e984380
 
 
 
 
 
 
 
f4eba6c
e984380
 
 
 
 
 
 
 
f4eba6c
e984380
 
 
 
 
 
 
 
 
 
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
---
title: Vocca-ai Prototype
emoji: πŸ“š
colorFrom: red
colorTo: blue
sdk: streamlit
sdk_version: 1.42.0
app_file: app.py
pinned: false
---



# MedCall AI - Call Analysis

## What is this?
MedCall AI is a tool that helps analyze patient calls. It figures out the caller’s intent, urgency, and mood, then generates a useful AI response. This makes handling medical calls easier and faster.

## Features
- **Summarizes Calls**: Takes a long call transcript and shortens it.
- **Understands Intent**: Detects if the caller wants an appointment, medical advice, billing help, etc.
- **Checks Urgency**: Decides if the request is urgent or not.
- **Analyzes Sentiment**: Detects if the caller is worried, neutral, or positive.
- **Stores Call Logs**: Saves call details in a database for reference.
- **Easy-to-Use Interface**: Built using Streamlit for a simple web-based UI.

## What’s Inside?
```
β”œβ”€β”€ app.py                  # Main application (UI)
β”œβ”€β”€ vocca_ai/
β”‚   β”œβ”€β”€ ai_response.py      # Call summarization
β”‚   β”œβ”€β”€ intent_classifier.py # Intent detection
β”‚   β”œβ”€β”€ sentiment.py        # Sentiment analysis
β”‚   β”œβ”€β”€ db_handler.py       # Saves call logs
β”‚   β”œβ”€β”€ preprocess.py       # Urgency scoring
β”œβ”€β”€ requirements.txt        # Required dependencies
β”œβ”€β”€ README.md               # This file
```

## How to Set Up
1. Clone the repository:
   ```sh
   git clone https://huggingface.co./spaces/Yuvrajspd09/MedCall-AI
   ```
2. Move into the project folder:
   ```sh
   cd MedCall-AI
   ```
3. Set up a virtual environment:
   ```sh
   python -m venv venv
   source venv/bin/activate  # Windows: `venv\Scripts\activate`
   ```
4. Install necessary libraries:
   ```sh
   pip install -r requirements.txt
   ```

## How to Use It
Run the application:
```sh
streamlit run app.py
```

### Example Usage
#### Summarizing a Call
```python
from vocca_ai.ai_response import generate_call_summary

sample_text = "I need an appointment as soon as possible."
summary = generate_call_summary(sample_text)
print(f"Summary: {summary}")
```

#### Detecting Intent
```python
from vocca_ai.intent_classifier import classify_intent

sample_text = "I want to book an appointment."
intent = classify_intent(sample_text)
print(f"Intent: {intent}")
```

#### Checking Sentiment
```python
from vocca_ai.sentiment import analyze_sentiment

sample_text = "I have been feeling really sick."
sentiment = analyze_sentiment(sample_text)
print(f"Sentiment: {sentiment}")
```

#### Logging Calls
```python
from vocca_ai.db_handler import log_call

log_call("I need an appointment", "appointment", "Low", "Neutral", "You can book an appointment online.")
```

## Want to Help?
If you’d like to improve this project, feel free to fork it, make changes, and submit a pull request!

## License
This project is open-source under the MIT License.