hellomattnewman commited on
Commit
5a9a528
1 Parent(s): f75d3db

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +15 -3
README.md CHANGED
@@ -1,3 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
1
  import torch
2
  import tensorflow as tf
3
  from transformers import RobertaTokenizer, RobertaModel
@@ -5,8 +16,8 @@ from transformers import AutoModelForSequenceClassification
5
  from transformers import TFAutoModelForSequenceClassification
6
  from transformers import AutoTokenizer
7
 
8
- tokenizer = AutoTokenizer.from_pretrained("hellomattnewman/msba-adrida")
9
- model = AutoModelForSequenceClassification.from_pretrained("hellomattnewman/msba-adrida")
10
 
11
  def adr_predict(x):
12
  encoded_input = tokenizer(x, return_tensors='pt')
@@ -17,4 +28,5 @@ def adr_predict(x):
17
 
18
  sentence = "I have severe pain."
19
 
20
- adr_predict(sentence)
 
 
1
+ ---
2
+ license: "mit"
3
+
4
+ widget:
5
+ - text: "Took the pill, 12 hours later my muscles started to really hurt, then my ribs started to burn so bad I couldn't breath."
6
+ ---
7
+
8
+ This model takes text (narrative of reasctions to medications) as input and returns a predicted severity score for the reaction (LABEL_1 is severe reaction). Please do NOT use for medical diagnosis.
9
+ Example usage:
10
+
11
+ ```python
12
  import torch
13
  import tensorflow as tf
14
  from transformers import RobertaTokenizer, RobertaModel
 
16
  from transformers import TFAutoModelForSequenceClassification
17
  from transformers import AutoTokenizer
18
 
19
+ tokenizer = AutoTokenizer.from_pretrained("UVA-MSBA/Mod4_T7")
20
+ model = AutoModelForSequenceClassification.from_pretrained("UVA-MSBA/Mod4_T7")
21
 
22
  def adr_predict(x):
23
  encoded_input = tokenizer(x, return_tensors='pt')
 
28
 
29
  sentence = "I have severe pain."
30
 
31
+ adr_predict(sentence)
32
+ ```