Spaces:
Sleeping
Sleeping
Delete README copy.md
Browse files- README copy.md +0 -229
README copy.md
DELETED
@@ -1,229 +0,0 @@
|
|
1 |
-
---
|
2 |
-
title: GlycoAI - AI Glucose Insights
|
3 |
-
emoji: π©Ί
|
4 |
-
colorFrom: blue
|
5 |
-
colorTo: purple
|
6 |
-
sdk: gradio
|
7 |
-
sdk_version: 4.44.0
|
8 |
-
app_file: main.py
|
9 |
-
pinned: false
|
10 |
-
license: mit
|
11 |
-
tags:
|
12 |
-
- healthcare
|
13 |
-
- diabetes
|
14 |
-
- glucose
|
15 |
-
- ai-assistant
|
16 |
-
- medical
|
17 |
-
- gradio
|
18 |
-
- mistral
|
19 |
-
- agent-demo-track
|
20 |
-
- dexcom
|
21 |
-
- cgm
|
22 |
-
---
|
23 |
-
|
24 |
-
# π©Ί GlycoAI - AI-Powered Glucose Insights
|
25 |
-
|
26 |
-
**An intelligent diabetes management assistant powered by Mistral AI and Dexcom CGM integration**
|
27 |
-
|
28 |
-
[](https://huggingface.co/spaces/)
|
29 |
-
[](https://gradio.app/)
|
30 |
-
[](https://mistral.ai/)
|
31 |
-
[](https://opensource.org/licenses/MIT)
|
32 |
-
|
33 |
-
## π Overview
|
34 |
-
|
35 |
-
GlycoAI is an advanced AI-powered chatbot that provides personalized glucose management insights for people with diabetes. By integrating Dexcom CGM data with Mistral AI's intelligent agents, it offers real-time analysis, pattern recognition, and actionable recommendations for better diabetes management.
|
36 |
-
|
37 |
-
### β¨ Key Features
|
38 |
-
|
39 |
-
- π **14-Day Glucose Analysis**: Comprehensive pattern analysis across two weeks of data
|
40 |
-
- π€ **AI-Powered Insights**: Mistral AI agent provides personalized recommendations
|
41 |
-
- π **Interactive Visualizations**: Glucose trend charts and statistics
|
42 |
-
- π₯ **Demo Users**: Pre-configured profiles for different diabetes scenarios
|
43 |
-
- π¬ **Natural Conversations**: Chat naturally about your glucose patterns and concerns
|
44 |
-
- π― **Clinical Targets**: Track time-in-range, hypoglycemia, and variability metrics
|
45 |
-
- π± **Multi-Device Support**: Works with G6, G7, and ONE+ CGM systems
|
46 |
-
|
47 |
-
## π Try It Now
|
48 |
-
|
49 |
-
**No setup required!** Simply:
|
50 |
-
1. Select a demo user (Sarah, Marcus, Jennifer, or Robert)
|
51 |
-
2. Load their 14-day glucose data
|
52 |
-
3. Start chatting with GlycoAI about patterns and recommendations
|
53 |
-
|
54 |
-
## π¬ Technical Implementation
|
55 |
-
|
56 |
-
### AI Agent Architecture
|
57 |
-
- **Mistral AI Agent**: Custom-trained agent specialized in diabetes management
|
58 |
-
- **Context-Aware**: Incorporates real glucose data into conversations
|
59 |
-
- **Pattern Recognition**: Identifies trends, meal effects, and lifestyle correlations
|
60 |
-
- **Personalized Advice**: Tailored recommendations based on individual patterns
|
61 |
-
|
62 |
-
### Data Processing Pipeline
|
63 |
-
```
|
64 |
-
Dexcom API β Data Validation β Pattern Analysis β AI Context β Chat Response
|
65 |
-
```
|
66 |
-
|
67 |
-
### Key Metrics Analyzed
|
68 |
-
- **Time in Range (TIR)**: Target 70-180 mg/dL
|
69 |
-
- **Glucose Variability**: Coefficient of variation
|
70 |
-
- **Hypoglycemia Risk**: Time below 70 mg/dL
|
71 |
-
- **Hyperglycemia**: Time above 180 mg/dL
|
72 |
-
- **Daily Patterns**: Dawn phenomenon, meal effects
|
73 |
-
- **Weekly Trends**: Weekday vs weekend variations
|
74 |
-
|
75 |
-
## π₯ Demo Users
|
76 |
-
|
77 |
-
### πββοΈ Sarah Thompson (G7 Mobile)
|
78 |
-
- **Profile**: 32-year-old professional with Type 1 diabetes
|
79 |
-
- **Pattern**: Stable control with meal spikes
|
80 |
-
- **Device**: Dexcom G7 with smartphone integration
|
81 |
-
|
82 |
-
### π¨βπ§βπ¦ Marcus Rodriguez (ONE+ Mobile)
|
83 |
-
- **Profile**: 45-year-old father with Type 2 diabetes
|
84 |
-
- **Pattern**: Dawn phenomenon, moderate variability
|
85 |
-
- **Device**: Dexcom ONE+ with lifestyle management focus
|
86 |
-
|
87 |
-
### π Jennifer Chen (G6 Mobile)
|
88 |
-
- **Profile**: 28-year-old graduate student with Type 1 diabetes
|
89 |
-
- **Pattern**: Exercise-related lows, tech-savvy user
|
90 |
-
- **Device**: Dexcom G6 with active lifestyle
|
91 |
-
|
92 |
-
### π¨βπ« Robert Williams (G6 Receiver)
|
93 |
-
- **Profile**: 67-year-old retired teacher with Type 2 diabetes
|
94 |
-
- **Pattern**: Consistent dawn phenomenon
|
95 |
-
- **Device**: Dexcom G6 with dedicated receiver
|
96 |
-
|
97 |
-
## π‘ Example Conversations
|
98 |
-
|
99 |
-
**"What's my average glucose level?"**
|
100 |
-
> Based on your 14-day data, your average glucose is 142 mg/dL with good stability. Your time in range is 68%, which is close to the clinical target of >70%. π
|
101 |
-
|
102 |
-
**"I keep having morning highs. What can I do?"**
|
103 |
-
> I notice you have dawn phenomenon with glucose rising 30-40 mg/dL between 4-7 AM. This affects 5 out of 14 mornings in your data. Consider discussing overnight insulin adjustments with your healthcare provider. π
|
104 |
-
|
105 |
-
**"How does my weekend compare to weekdays?"**
|
106 |
-
> Interesting pattern! Your weekends show 15 mg/dL lower average glucose (135 vs 150 mg/dL weekdays). You seem to have more consistent meal timing on weekends. π
|
107 |
-
|
108 |
-
## π οΈ Technical Stack
|
109 |
-
|
110 |
-
- **Frontend**: Gradio 4.44.0 with custom CSS styling
|
111 |
-
- **Backend**: Python with FastAPI-style architecture
|
112 |
-
- **AI Engine**: Mistral AI agents with specialized diabetes knowledge
|
113 |
-
- **Data Source**: Dexcom Sandbox API with realistic mock data
|
114 |
-
- **Visualization**: Plotly for interactive glucose charts
|
115 |
-
- **Processing**: Pandas/NumPy for statistical analysis
|
116 |
-
|
117 |
-
## π Data Analysis Features
|
118 |
-
|
119 |
-
### Pattern Recognition
|
120 |
-
- **Meal Effects**: Identifies post-meal glucose spikes and timing
|
121 |
-
- **Exercise Impact**: Detects glucose drops during physical activity
|
122 |
-
- **Sleep Patterns**: Analyzes overnight glucose stability
|
123 |
-
- **Stress Correlation**: Identifies high-glucose periods linked to lifestyle
|
124 |
-
|
125 |
-
### Statistical Analysis
|
126 |
-
- **Glucose Management Indicator (GMI)**: HbA1c estimation
|
127 |
-
- **Coefficient of Variation**: Glucose stability measurement
|
128 |
-
- **Time-in-Range Analysis**: Clinical target tracking
|
129 |
-
- **Trend Analysis**: Week-over-week improvement detection
|
130 |
-
|
131 |
-
### Predictive Insights
|
132 |
-
- **Risk Identification**: Predicts hypoglycemia patterns
|
133 |
-
- **Optimization Suggestions**: Recommends timing adjustments
|
134 |
-
- **Lifestyle Correlations**: Links patterns to daily activities
|
135 |
-
- **Goal Tracking**: Monitors progress toward clinical targets
|
136 |
-
|
137 |
-
## π Privacy & Security
|
138 |
-
|
139 |
-
- **No Data Storage**: Conversations and glucose data are not permanently stored
|
140 |
-
- **Sandbox Environment**: Uses Dexcom's secure sandbox API
|
141 |
-
- **Educational Purpose**: Designed for demonstration and learning
|
142 |
-
- **Medical Disclaimer**: Not intended to replace professional medical advice
|
143 |
-
|
144 |
-
## βοΈ Medical Disclaimer
|
145 |
-
|
146 |
-
**Important**: GlycoAI is for educational and informational purposes only. It does not provide medical advice, diagnosis, or treatment. Always consult with qualified healthcare providers before making any changes to your diabetes management plan.
|
147 |
-
|
148 |
-
## π― Agent Demo Track
|
149 |
-
|
150 |
-
This application showcases advanced AI agent capabilities for healthcare applications:
|
151 |
-
|
152 |
-
- **Contextual Understanding**: Processes complex medical data
|
153 |
-
- **Personalized Responses**: Adapts advice to individual patterns
|
154 |
-
- **Multi-Modal Analysis**: Combines numerical data with conversational AI
|
155 |
-
- **Domain Expertise**: Specialized knowledge in diabetes management
|
156 |
-
- **Real-Time Processing**: Instant analysis of glucose trends
|
157 |
-
|
158 |
-
Perfect example of how AI agents can augment healthcare decision-making while maintaining appropriate clinical boundaries.
|
159 |
-
|
160 |
-
## π Getting Started
|
161 |
-
|
162 |
-
### Option 1: Use This Space (Recommended)
|
163 |
-
Just click the demo above! No installation needed.
|
164 |
-
|
165 |
-
### Option 2: Local Installation
|
166 |
-
```bash
|
167 |
-
git clone https://github.com/your-repo/glycoai
|
168 |
-
cd glycoai
|
169 |
-
pip install -r requirements.txt
|
170 |
-
python main.py
|
171 |
-
```
|
172 |
-
|
173 |
-
### Option 3: API Integration
|
174 |
-
```python
|
175 |
-
from mistral_chat import GlucoBuddyMistralChat
|
176 |
-
|
177 |
-
# Initialize with your Mistral API key
|
178 |
-
chat = GlucoBuddyMistralChat("your-api-key", "your-agent-id")
|
179 |
-
|
180 |
-
# Load demo user
|
181 |
-
chat.load_user_data("sarah_g7")
|
182 |
-
|
183 |
-
# Start chatting
|
184 |
-
response = chat.chat_with_mistral("What's my time in range?")
|
185 |
-
print(response['response'])
|
186 |
-
```
|
187 |
-
|
188 |
-
## π Roadmap
|
189 |
-
|
190 |
-
- [ ] **Real Dexcom Integration**: Connect to live CGM data
|
191 |
-
- [ ] **Health data**: integration with Apple Health for obtaining further insights (e.g hormonal influence)
|
192 |
-
- [ ] **Insulin Tracking**: Dosing recommendations and timing
|
193 |
-
- [ ] **Healthcare Provider Dashboard**: Shareable reports
|
194 |
-
- [ ] **Mobile App**: Native iOS/Android applications
|
195 |
-
- [ ] **Multiple Languages**: Multilingual diabetes support
|
196 |
-
|
197 |
-
## π€ Contributing
|
198 |
-
|
199 |
-
We welcome contributions! Areas of interest:
|
200 |
-
- **Medical Accuracy**: Improve clinical recommendations
|
201 |
-
- **UI/UX Enhancement**: Better user experience design
|
202 |
-
- **Data Analysis**: Advanced pattern recognition algorithms
|
203 |
-
- **Agent Training**: Enhance AI conversation quality
|
204 |
-
- **Integration**: Additional CGM device support
|
205 |
-
|
206 |
-
## π Support
|
207 |
-
|
208 |
-
- **Documentation**: [Full Documentation](https://github.com/your-repo/glycoai/wiki)
|
209 |
-
- **Issues**: [GitHub Issues](https://github.com/your-repo/glycoai/issues)
|
210 |
-
- **Discussions**: [Community Forum](https://github.com/your-repo/glycoai/discussions)
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
## π License
|
215 |
-
|
216 |
-
MIT License - see [LICENSE](LICENSE) file for details.
|
217 |
-
|
218 |
-
---
|
219 |
-
|
220 |
-
<div align="center">
|
221 |
-
|
222 |
-
**Built with β€οΈ for the diabetes community**
|
223 |
-
|
224 |
-
*Empowering better glucose management through AI*
|
225 |
-
|
226 |
-
[](https://huggingface.co/spaces/)
|
227 |
-
[](https://github.com/your-repo/glycoai)
|
228 |
-
|
229 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|