File size: 1,234 Bytes
24426b6
 
23a8f5a
 
 
1191ca2
 
 
 
 
 
 
24426b6
b50cb56
24426b6
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import gradio as gr

context = "What should be documented in a care plan?/n"
context = context + "Regardless of what your preferences are, your care plan should include:/n"
context = context + "What your assessed care needs are./n"
context = context + "What type of support you should receive."
context = context + "Your desired outcomes."
context = context + "Who should provide care."
context = context + "When care and support should be provided."
context = context + "Records of care provided."
context = context + "Your wishes and personal preferences."
context = context + "The costs of the services."

question = "What should be documented in a care plan?"

gr.Interface.load(
             "huggingface/deepset/roberta-base-squad2",
             theme="default",
             css=".footer{display:none !important}",
             inputs=[gr.inputs.Textbox(lines=40, default=context, label="Context paragraph"), gr.inputs.Textbox(lines=10, default=question, label="Question")],
             outputs=[gr.outputs.Textbox(label="Answer"), gr.outputs.Textbox(label="Score")],
             title=None,
             description="Provide your own paragraph and ask any question about the text. How well does the model answer?").launch()