Spaces:
Sleeping
Sleeping
Final submission
Browse files
README.md
CHANGED
|
@@ -8,125 +8,110 @@ sdk: gradio
|
|
| 8 |
sdk_version: 6.0.0
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
-
# 🩺 AnatomyBot
|
| 14 |
|
| 15 |
-
|
|
|
|
| 16 |
|
| 17 |
-
|
|
|
|
| 18 |
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
-
-
|
| 22 |
-
-
|
| 23 |
-
-
|
|
|
|
| 24 |
|
| 25 |
-
|
|
|
|
|
|
|
| 26 |
|
| 27 |
-
|
| 28 |
|
| 29 |
-
|
| 30 |
-
* **Anatomy Validation**: Uses **Hyperbolic AI (Llama 3.3 70B)** to ensure questions are strictly anatomy-related.
|
| 31 |
-
* **Visuals**: Fetches high-quality diagrams using **SERPAPI (Google Images)**, filtering out non-diagrammatic results.
|
| 32 |
-
* **Educational Content**: Generates structured, emoji-rich summaries (Location, Features, Clinical Significance).
|
| 33 |
|
| 34 |
-
|
| 35 |
-
*
|
| 36 |
-
|
| 37 |
-
*
|
|
|
|
|
|
|
| 38 |
|
| 39 |
-
|
| 40 |
-
* **PDF Analysis**: Allows students to upload their own textbooks.
|
| 41 |
-
* **Page Extraction**: Extracts and displays specific pages for focused study.
|
| 42 |
-
* **AI Tutor**: Analyzes page content to generate summaries, clinical points, and self-test questions.
|
| 43 |
|
| 44 |
-
|
| 45 |
-
* **Registration**: Includes a registration system (SQLite backend) to track student details (Name, Medical School, Year).
|
| 46 |
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
* **Voice Synthesis**: ElevenLabs API (Text-to-Speech)
|
| 53 |
-
* **Database**: SQLite (for user management)
|
| 54 |
-
* **Image/PDF Processing**: Pillow, PyPDF2, pdf2image
|
| 55 |
-
* **Environment**: Python, Hugging Face Spaces
|
| 56 |
|
| 57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
### Prerequisites
|
| 60 |
- Python 3.8 or higher
|
| 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 |
-
- "Brachial plexus anatomy"
|
| 96 |
-
- "Carpal bones arrangement"
|
| 97 |
-
- "Layers of the scalp"
|
| 98 |
-
- "Anatomy of the heart chambers"
|
| 99 |
-
|
| 100 |
-
## ☁️ Deployment to Hugging Face Spaces
|
| 101 |
-
|
| 102 |
-
1. Create a new Space on [Hugging Face](https://huggingface.co/spaces)
|
| 103 |
-
2. Select **Gradio** as the SDK
|
| 104 |
-
3. Upload all files: `app.py`, `requirements.txt`, `README.md`
|
| 105 |
-
4. Add your API keys as **Secrets** in Space settings:
|
| 106 |
-
- `SERPAPI_KEY`
|
| 107 |
-
- `HYPERBOLIC_API_KEY`
|
| 108 |
-
- `ELEVENLABS_API_KEY`
|
| 109 |
-
5. Your app will automatically deploy!
|
| 110 |
-
|
| 111 |
-
## 📂 Project Structure
|
| 112 |
-
|
| 113 |
-
```
|
| 114 |
-
SimpleHF/
|
| 115 |
-
├── app.py # Main application logic
|
| 116 |
-
├── capp.py # Extended application logic (if applicable)
|
| 117 |
-
├── requirements.txt # Python dependencies
|
| 118 |
-
├── .env # API keys (not committed to git)
|
| 119 |
-
└── README.md # This documentation
|
| 120 |
-
```
|
| 121 |
-
|
| 122 |
-
## ⚠️ Security Note
|
| 123 |
-
|
| 124 |
-
Never commit your `.env` file with actual API keys to version control. The included `.env` is a template only.
|
| 125 |
-
|
| 126 |
-
## 📄 License
|
| 127 |
-
|
| 128 |
-
This project is for educational purposes.
|
| 129 |
-
|
| 130 |
-
## 🤝 Support
|
| 131 |
-
|
| 132 |
-
For issues or questions, please refer to the documentation or create an issue in the repository.
|
|
|
|
| 8 |
sdk_version: 6.0.0
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
| 11 |
+
license: mit
|
| 12 |
+
short_description: AnatomyBot - Interactive AI-powered MBBS anatomy tutor.
|
| 13 |
+
tags:
|
| 14 |
+
- building-mcp-track-enterprise
|
| 15 |
+
- building-mcp-track-customer
|
| 16 |
+
- building-mcp-track-creative
|
| 17 |
---
|
| 18 |
|
| 19 |
+
# 🩺 AnatomyBot – MBBS Anatomy Tutor
|
| 20 |
|
| 21 |
+
Welcome to our submission for the **Hugging Face MCP 1st Birthday Hackathon**!
|
| 22 |
+
This project showcases **an intelligent multi-agent educational system** powered by **Gradio**, designed to revolutionize how medical students learn anatomy through **visuals, voice interaction, and active recall**.
|
| 23 |
|
| 24 |
+
**Link to demo:** [https://huggingface.co/spaces/gladguy/SimpleProject](https://huggingface.co/spaces/gladguy/SimpleProject)
|
| 25 |
+
**YouTube Video:** [https://www.youtube.com/watch?v=5L5suQMTd5I](https://www.youtube.com/watch?v=5L5suQMTd5I)
|
| 26 |
|
| 27 |
+
---
|
| 28 |
+
|
| 29 |
+
## 🌐 Project Overview
|
| 30 |
+
|
| 31 |
+
This system leverages specialized AI agents that collaborate to create an immersive learning experience:
|
| 32 |
|
| 33 |
+
- 🛡️ **Validator Agent**: Ensures all queries are strictly anatomy-related using **Hyperbolic AI**.
|
| 34 |
+
- 🖼️ **Visual Agent**: Instantly fetches and filters high-quality anatomical diagrams via **SERPAPI**.
|
| 35 |
+
- 👨⚕️ **Professor Agent**: Conducts oral VIVA exams, generating questions and vocalizing them using **ElevenLabs**.
|
| 36 |
+
- 🧠 **Analyst Agent**: Reads and interprets uploaded textbook pages to generate summaries and quizzes.
|
| 37 |
|
| 38 |
+
---
|
| 39 |
+
|
| 40 |
+
## 🗂️ Data Sources & External APIs
|
| 41 |
|
| 42 |
+
Our platform relies on **state-of-the-art AI models and real-time data**. Each component is powered by a dedicated API to ensure accuracy and engagement.
|
| 43 |
|
| 44 |
+
**Here is a detailed overview of the APIs and data sources leveraged by the agents:**
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
+
1. **Hyperbolic AI (Llama 3.3 70B)** – *The Brain*
|
| 47 |
+
* Used for query validation, educational content generation, and student answer evaluation.
|
| 48 |
+
2. **SERPAPI (Google Images)** – *The Eyes*
|
| 49 |
+
* Provides real-time access to high-quality medical diagrams and illustrations.
|
| 50 |
+
3. **ElevenLabs** – *The Voice*
|
| 51 |
+
* Powers the "Professor Agent" to speak VIVA questions, simulating a real oral exam.
|
| 52 |
|
| 53 |
+
---
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
+
## 🧩 Core Components
|
|
|
|
| 56 |
|
| 57 |
+
### 🎨 User Interface (`app.py`)
|
| 58 |
+
- **Interactive Gradio Interface**: A clean, tabbed UI optimized for learning.
|
| 59 |
+
- **Real-time Feedback**: Instant visual and audio responses.
|
| 60 |
+
- **Navigation**: Seamless switching between Learning, VIVA, and Book modes.
|
| 61 |
|
| 62 |
+
### 🧠 Logic & Agents (`capp.py`)
|
| 63 |
+
- **Agent Definitions**: Contains the logic for the Validator, Visual, and Professor agents.
|
| 64 |
+
- **State Management**: Handles user sessions, VIVA progress, and PDF processing.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
|
| 66 |
+
### 💾 Data Persistence (`students.db`)
|
| 67 |
+
- **Student Records**: SQLite database to track registered students (Name, Medical School, Year).
|
| 68 |
+
|
| 69 |
+
---
|
| 70 |
+
|
| 71 |
+
## 🔗 Quick Links
|
| 72 |
+
|
| 73 |
+
- 🏆 **Hackathon:** [MCP 1st Birthday Hackathon](https://huggingface.co/MCP-1st-Birthday)
|
| 74 |
+
- 📺 **YouTube Demo:** [Watch Video](https://www.youtube.com/watch?v=5L5suQMTd5I)
|
| 75 |
+
- 🚀 **Live Demo:** [Try AnatomyBot](https://huggingface.co/spaces/gladguy/SimpleProject)
|
| 76 |
+
- 💼 **LinkedIn Post:** [View Post](https://www.linkedin.com/posts/gladguy_learn-anatomy-with-ai-activity-7400990572884168705-14Ln/)
|
| 77 |
+
|
| 78 |
+
---
|
| 79 |
+
|
| 80 |
+
## 🛠️ Installation & Setup
|
| 81 |
|
| 82 |
### Prerequisites
|
| 83 |
- Python 3.8 or higher
|
| 84 |
+
- API Keys for SERPAPI, Hyperbolic, and ElevenLabs.
|
| 85 |
+
|
| 86 |
+
### Steps
|
| 87 |
+
1. Clone the repository:
|
| 88 |
+
```bash
|
| 89 |
+
git clone https://huggingface.co/spaces/gladguy/SimpleProject
|
| 90 |
+
cd SimpleProject
|
| 91 |
+
```
|
| 92 |
+
2. Install dependencies:
|
| 93 |
+
```bash
|
| 94 |
+
pip install -r requirements.txt
|
| 95 |
+
```
|
| 96 |
+
3. Set up your `.env` file:
|
| 97 |
+
```bash
|
| 98 |
+
SERPAPI_KEY=your_key
|
| 99 |
+
HYPERBOLIC_API_KEY=your_key
|
| 100 |
+
ELEVENLABS_API_KEY=your_key
|
| 101 |
+
```
|
| 102 |
+
4. Run the app:
|
| 103 |
+
```bash
|
| 104 |
+
python app.py or uv run app.py
|
| 105 |
+
```
|
| 106 |
+
|
| 107 |
+
---
|
| 108 |
+
|
| 109 |
+
## 🧑💻 Authors
|
| 110 |
+
|
| 111 |
+
- **Waheed** – *Lead Developer & AI Architect*
|
| 112 |
+
|
| 113 |
+
---
|
| 114 |
+
|
| 115 |
+
## 📝 License
|
| 116 |
+
|
| 117 |
+
This project is licensed under the MIT License.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|