Priyabrata017 commited on
Commit
556aa1c
1 Parent(s): a0b74a0

Create new file

Browse files
Files changed (1) hide show
  1. app.py +36 -0
app.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ context = "What should be documented in a care plan?\n"
4
+ context = context + "Regardless of what your preferences are, your care plan should include:\n"
5
+ context = context + "What your assessed care needs are.\n"
6
+ context = context + "What type of support you should receive.\n"
7
+ context = context + "Your desired outcomes.\n"
8
+ context = context + "Who should provide care.\n"
9
+ context = context + "When care and support should be provided.\n"
10
+ context = context + "Records of care provided.\n"
11
+ context = context + "Your wishes and personal preferences.\n"
12
+ context = context + "The costs of the services.\n"
13
+ context = context + "Dimensions\n"
14
+ context = context + "1-Ontology of Plan\n"
15
+ context = context + "2-Problems as evidenced by Signs of Systems\n"
16
+ context = context + "3-Assessment of Needs\n"
17
+ context = context + "4-Questions about problems faced\n"
18
+ context = context + "5-Goals for long and short term improvements\n"
19
+ context = context + "6-Knowledge-Behavior-Status Quality Measures\n"
20
+ context = context + "7-Intervention List of Options\n"
21
+ context = context + "8-Quality Measures\n"
22
+ context = context + "9-Pathways Available\n"
23
+
24
+ with open('WritingCarePlans.txt', 'r') as file:
25
+ context = file.read()
26
+
27
+ question = "What should be documented in a care plan?"
28
+
29
+ gr.Interface.load(
30
+ "huggingface/deepset/roberta-base-squad2",
31
+ theme="default",
32
+ css=".footer{display:none !important}",
33
+ inputs=[gr.inputs.Textbox(lines=12, default=context, label="Context paragraph"), gr.inputs.Textbox(lines=3, default=question, label="Question")],
34
+ outputs=[gr.outputs.Textbox(label="Answer"), gr.outputs.Textbox(label="Score")],
35
+ title=None,
36
+ description="Provide your own paragraph and ask any question about the text. How well does the model answer?").launch()