Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,14 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
-
|
5 |
def SetContext(textfile):
|
6 |
-
|
7 |
-
|
8 |
-
|
|
|
|
|
|
|
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 = [
|