Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -13,14 +13,17 @@ pipe_biogpt = pipeline("text-generation", model="microsoft/biogpt-large-pubmedqa
|
|
13 |
|
14 |
title = "BioGPT Q&A Demo"
|
15 |
description = """
|
|
|
|
|
16 |
Check out the [BioGPT-Large-PubMedQA model card](https://huggingface.co/microsoft/biogpt-large-pubmedqa) for more info.
|
|
|
17 |
**Disclaimer:** this demo was made for research purposes only and should not be used for medical purposes.
|
18 |
"""
|
19 |
|
20 |
def inference(text):
|
21 |
output_biogpt = pipe_biogpt(text, max_length=100)[0]["generated_text"]
|
22 |
return [
|
23 |
-
output_biogpt[-1],
|
24 |
]
|
25 |
|
26 |
io = gr.Interface(
|
|
|
13 |
|
14 |
title = "BioGPT Q&A Demo"
|
15 |
description = """
|
16 |
+
NOTE: this model requires the inputs in the following format: `question: <text> context: <text> answer: <text> target: the answer to the question given the context is`.
|
17 |
+
|
18 |
Check out the [BioGPT-Large-PubMedQA model card](https://huggingface.co/microsoft/biogpt-large-pubmedqa) for more info.
|
19 |
+
|
20 |
**Disclaimer:** this demo was made for research purposes only and should not be used for medical purposes.
|
21 |
"""
|
22 |
|
23 |
def inference(text):
|
24 |
output_biogpt = pipe_biogpt(text, max_length=100)[0]["generated_text"]
|
25 |
return [
|
26 |
+
output_biogpt.split(' ')[-1],
|
27 |
]
|
28 |
|
29 |
io = gr.Interface(
|