Preetesh commited on
Commit
049309a
1 Parent(s): 63972f0

Create new file

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