awacke1 commited on
Commit
f8aee80
β€’
1 Parent(s): 35cc57e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -1,11 +1,14 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
- context = ""
5
  def SetContext(textfile):
6
- with open(textfile, 'r') as file:
7
- context = file.read()
8
- SetContext('WritingCarePlans.txt')
 
 
 
9
  question = "What should be documented in a care plan?"
10
  title = "Transformers - Sentence to Paragraph - For Mindfulness"
11
  examples = [
 
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
+
5
  def SetContext(textfile):
6
+ context = ""
7
+ with open(textfile, 'r') as file:
8
+ context = file.read()
9
+ return context
10
+
11
+ context = SetContext('WritingCarePlans.txt') # open text file fill textbox
12
  question = "What should be documented in a care plan?"
13
  title = "Transformers - Sentence to Paragraph - For Mindfulness"
14
  examples = [