Spaces:
Running
Running
title: MedCall AI | |
emoji: π | |
colorFrom: red | |
colorTo: blue | |
sdk: streamlit | |
sdk_version: 1.43.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. |