Valentina9502 commited on
Commit
6f69718
Β·
verified Β·
1 Parent(s): f2e749f

Upload readme

Browse files
Files changed (1) hide show
  1. README copy.md +229 -0
README copy.md ADDED
@@ -0,0 +1,229 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/)
29
+ [![Gradio](https://img.shields.io/badge/Gradio-4.44.0-orange)](https://gradio.app/)
30
+ [![Mistral AI](https://img.shields.io/badge/Mistral%20AI-Agent-red)](https://mistral.ai/)
31
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](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
+ [![Follow on HF](https://img.shields.io/badge/Follow%20on-Hugging%20Face-yellow)](https://huggingface.co/spaces/)
227
+ [![Star on GitHub](https://img.shields.io/badge/Star%20on-GitHub-black)](https://github.com/your-repo/glycoai)
228
+
229
+ </div>