Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,11 +7,13 @@ with open('Context.txt', 'r') as file:
|
|
7 |
context = file.read()
|
8 |
|
9 |
question = "What should be documented in a care plan?"
|
10 |
-
|
|
|
|
|
11 |
|
12 |
gr.Interface.load(
|
13 |
"huggingface/deepset/roberta-base-squad2",
|
14 |
-
api_key=
|
15 |
theme="default",
|
16 |
css=".footer{display:none !important}",
|
17 |
inputs=[gr.inputs.Textbox(lines=12, default=context, label="Context paragraph"), gr.inputs.Textbox(lines=3, default=question, label="Question")],
|
|
|
7 |
context = file.read()
|
8 |
|
9 |
question = "What should be documented in a care plan?"
|
10 |
+
|
11 |
+
API_KEY = os.environ.get("HF_TOKEN")
|
12 |
+
headers = {"Authorization": f"Bearer {API_KEY}"}
|
13 |
|
14 |
gr.Interface.load(
|
15 |
"huggingface/deepset/roberta-base-squad2",
|
16 |
+
api_key=headers,
|
17 |
theme="default",
|
18 |
css=".footer{display:none !important}",
|
19 |
inputs=[gr.inputs.Textbox(lines=12, default=context, label="Context paragraph"), gr.inputs.Textbox(lines=3, default=question, label="Question")],
|