Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,16 +13,13 @@ def answer_question(question):
|
|
13 |
outputs = finetuned_model.generate(**tokenized_inputs)
|
14 |
answer = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
15 |
|
16 |
-
|
17 |
-
actual = "Very low Mg2+ levels correspond to low PTH levels which in turn results in low Ca2+ levels."
|
18 |
-
|
19 |
-
return fill(answer, width=80), fill(actual, width=80)
|
20 |
|
21 |
# Create Gradio interface
|
22 |
iface = gr.Interface(
|
23 |
fn=answer_question,
|
24 |
inputs="text",
|
25 |
-
outputs=
|
26 |
title="Medical Question Answering",
|
27 |
description="Enter a medical question to get a truthful answer from the finetuned T5 model.",
|
28 |
examples=[["What is the relationship between very low Mg2+ levels, PTH levels, and Ca2+ levels?"]]
|
|
|
13 |
outputs = finetuned_model.generate(**tokenized_inputs)
|
14 |
answer = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
15 |
|
16 |
+
return fill(answer, width=80)
|
|
|
|
|
|
|
17 |
|
18 |
# Create Gradio interface
|
19 |
iface = gr.Interface(
|
20 |
fn=answer_question,
|
21 |
inputs="text",
|
22 |
+
outputs="text"
|
23 |
title="Medical Question Answering",
|
24 |
description="Enter a medical question to get a truthful answer from the finetuned T5 model.",
|
25 |
examples=[["What is the relationship between very low Mg2+ levels, PTH levels, and Ca2+ levels?"]]
|