--- license: apache-2.0 --- widget: - text: "I never imagined a pill could cause so much pain. It started with a dull ache, then my muscles felt like they were on fire. Breathing became a struggle, each breath felt like a battle. It's terrifying how quickly things can change when you least expect it." --- 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. Example usage: ```python import torch import tensorflow as tf from transformers import RobertaTokenizer, RobertaModel from transformers import AutoModelForSequenceClassification from transformers import TFAutoModelForSequenceClassification from transformers import AutoTokenizer tokenizer = AutoTokenizer.from_pretrained("UVA-MSBA/Mod4_T12") model = AutoModelForSequenceClassification.from_pretrained("UVA-MSBA/Mod4_T12") def adr_predict(x): encoded_input = tokenizer(x, return_tensors='pt') output = model(**encoded_input) scores = output[0][0].detach().numpy() scores = tf.nn.softmax(scores) return scores.numpy()[1] sentence = "I have an extremely bad headache." adr_predict(sentence) ```