Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -20,8 +20,8 @@ csv.field_size_limit(sys.maxsize)
|
|
20 |
|
21 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
22 |
|
23 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
24 |
-
model = AutoModelForSequenceClassification.from_pretrained("
|
25 |
|
26 |
# build a pipeline object to do predictions
|
27 |
pred = transformers.pipeline("text-classification", model=model,
|
@@ -134,7 +134,7 @@ with gr.Blocks(title=title) as demo:
|
|
134 |
with gr.Row():
|
135 |
gr.Markdown("### Click on any of the examples below to see how it works:")
|
136 |
gr.Examples([["A 65 year-old male had severe headache after taking Aspirin. The lab results were normal."],
|
137 |
-
["A 65 year-old female had minor pain in upper abdomen after taking
|
138 |
[prob1], [label,local_plot, htext
|
139 |
# , med, sym
|
140 |
], main, cache_examples=True)
|
|
|
20 |
|
21 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
22 |
|
23 |
+
tokenizer = AutoTokenizer.from_pretrained("MiyunKim/Mod4Team5")
|
24 |
+
model = AutoModelForSequenceClassification.from_pretrained("MiyunKim/Mod4Team5").to(device)
|
25 |
|
26 |
# build a pipeline object to do predictions
|
27 |
pred = transformers.pipeline("text-classification", model=model,
|
|
|
134 |
with gr.Row():
|
135 |
gr.Markdown("### Click on any of the examples below to see how it works:")
|
136 |
gr.Examples([["A 65 year-old male had severe headache after taking Aspirin. The lab results were normal."],
|
137 |
+
["A 65 year-old female had minor pain in upper abdomen after taking Warfarin."]],
|
138 |
[prob1], [label,local_plot, htext
|
139 |
# , med, sym
|
140 |
], main, cache_examples=True)
|