Spaces:
Running
Running
Update README.md
Browse files
README.md
CHANGED
@@ -1,12 +1,95 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
+
# MedCall AI - Call Analysis
|
2 |
+
|
3 |
+
## What is this?
|
4 |
+
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.
|
5 |
+
|
6 |
+
## Features
|
7 |
+
- **Summarizes Calls**: Takes a long call transcript and shortens it.
|
8 |
+
- **Understands Intent**: Detects if the caller wants an appointment, medical advice, billing help, etc.
|
9 |
+
- **Checks Urgency**: Decides if the request is urgent or not.
|
10 |
+
- **Analyzes Sentiment**: Detects if the caller is worried, neutral, or positive.
|
11 |
+
- **Stores Call Logs**: Saves call details in a database for reference.
|
12 |
+
- **Easy-to-Use Interface**: Built using Streamlit for a simple web-based UI.
|
13 |
+
|
14 |
+
## Whatβs Inside?
|
15 |
+
```
|
16 |
+
βββ app.py # Main application (UI)
|
17 |
+
βββ medcall_ai/
|
18 |
+
β βββ ai_response.py # Call summarization
|
19 |
+
β βββ intent_classifier.py # Intent detection
|
20 |
+
β βββ sentiment.py # Sentiment analysis
|
21 |
+
β βββ db_handler.py # Saves call logs
|
22 |
+
β βββ preprocess.py # Urgency scoring
|
23 |
+
βββ requirements.txt # Required dependencies
|
24 |
+
βββ README.md # This file
|
25 |
+
```
|
26 |
+
|
27 |
+
## How to Set Up
|
28 |
+
1. Clone the repository:
|
29 |
+
```sh
|
30 |
+
git clone https://huggingface.co/spaces/Yuvrajspd09/MedCall-AI
|
31 |
+
```
|
32 |
+
2. Move into the project folder:
|
33 |
+
```sh
|
34 |
+
cd MedCall-AI
|
35 |
+
```
|
36 |
+
3. Set up a virtual environment:
|
37 |
+
```sh
|
38 |
+
python -m venv venv
|
39 |
+
source venv/bin/activate # Windows: `venv\Scripts\activate`
|
40 |
+
```
|
41 |
+
4. Install necessary libraries:
|
42 |
+
```sh
|
43 |
+
pip install -r requirements.txt
|
44 |
+
```
|
45 |
+
|
46 |
+
## How to Use It
|
47 |
+
Run the application:
|
48 |
+
```sh
|
49 |
+
streamlit run app.py
|
50 |
+
```
|
51 |
+
|
52 |
+
### Example Usage
|
53 |
+
#### Summarizing a Call
|
54 |
+
```python
|
55 |
+
from medcall_ai.ai_response import generate_call_summary
|
56 |
+
|
57 |
+
sample_text = "I need an appointment as soon as possible."
|
58 |
+
summary = generate_call_summary(sample_text)
|
59 |
+
print(f"Summary: {summary}")
|
60 |
+
```
|
61 |
+
|
62 |
+
#### Detecting Intent
|
63 |
+
```python
|
64 |
+
from medcall_ai.intent_classifier import classify_intent
|
65 |
+
|
66 |
+
sample_text = "I want to book an appointment."
|
67 |
+
intent = classify_intent(sample_text)
|
68 |
+
print(f"Intent: {intent}")
|
69 |
+
```
|
70 |
+
|
71 |
+
#### Checking Sentiment
|
72 |
+
```python
|
73 |
+
from medcall_ai.sentiment import analyze_sentiment
|
74 |
+
|
75 |
+
sample_text = "I have been feeling really sick."
|
76 |
+
sentiment = analyze_sentiment(sample_text)
|
77 |
+
print(f"Sentiment: {sentiment}")
|
78 |
+
```
|
79 |
+
|
80 |
+
#### Logging Calls
|
81 |
+
```python
|
82 |
+
from medcall_ai.db_handler import log_call
|
83 |
+
|
84 |
+
log_call("I need an appointment", "appointment", "Low", "Neutral", "You can book an appointment online.")
|
85 |
+
```
|
86 |
+
|
87 |
+
## Want to Help?
|
88 |
+
If youβd like to improve this project, feel free to fork it, make changes, and submit a pull request!
|
89 |
+
|
90 |
+
## License
|
91 |
+
This project is open-source under the MIT License.
|
92 |
+
|
93 |
+
|
94 |
|
95 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|