Files changed (1) hide show
  1. README.md +45 -0
README.md ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ # For reference on model card metadata, see the spec: https://github.com/huggingface/hub-docs/blob/main/modelcard.md?plain=1
3
+ # Doc / guide: https://huggingface.co/docs/hub/model-cards
4
+ {}
5
+ ---
6
+
7
+ # Model Card for Gluformer Blood Glucose Prediction Model with Uncertainty
8
+
9
+ <!-- Provide a quick summary of what the model is/does. -->
10
+
11
+ This model uses past continuous glucose monitor (CGM) values to predict values for the next hour.
12
+
13
+ ## Model Details
14
+
15
+ ### Model Description
16
+
17
+ - **Developed by:** Renat Sergazinov, Mohammadreza Armandpour, Irina Gaynanova
18
+ - **Funded by:** Texas A&M University
19
+ - **Shared by:** Nat Jeffries
20
+ - **Model type:** Time series encoder-decoder Transformer
21
+
22
+ ### Model Sources [optional]
23
+
24
+ - **Repository:** [Github](https://github.com/mrsergazinov/gluformer)
25
+ - **Paper:** [Arxiv](https://arxiv.org/pdf/2209.04526)
26
+
27
+ ## How to Get Started with the Model
28
+
29
+ Use the code below to get started with the model.
30
+
31
+ ```
32
+ from transformers import AutoModel
33
+ from datetime import timedelta, datetime
34
+
35
+ model = AutoModel.from_pretrained('njeffrie/Gluformer', trust_remote_code=True)
36
+ config = AutoConfig.from_pretrained('njeffrie/Gluformer', trust_remote_code=True)
37
+
38
+ # Dummy input and timestamp values.
39
+ input_glucose = [100.0 for _ in range(config.len_seq)]
40
+ timestamps = [datetime(2025, 7, 25, 0, 0) + timedelta(minutes=5 * i) for i in range(len(input_glucose))]
41
+ subject_id = 0
42
+
43
+ pred, log_var = model(subject_id, timestamps, input_glucose)
44
+ ```
45
+