Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -388,7 +388,7 @@ def answer_question(context, question):
|
|
| 388 |
- Err on the side of caution. In case there is even a remote possibility that there might be something that required human attention, flag it.
|
| 389 |
|
| 390 |
"""}
|
| 391 |
-
{"role": "user", "content": f"Context: {
|
| 392 |
]
|
| 393 |
|
| 394 |
response = qa_pipeline(messages, max_new_tokens=256)[0]['generated_text']
|
|
@@ -440,7 +440,7 @@ with gr.Blocks() as iface:
|
|
| 440 |
|
| 441 |
answer_button.click(
|
| 442 |
answer_question,
|
| 443 |
-
inputs=[
|
| 444 |
outputs=[answer_output]
|
| 445 |
)
|
| 446 |
|
|
|
|
| 388 |
- Err on the side of caution. In case there is even a remote possibility that there might be something that required human attention, flag it.
|
| 389 |
|
| 390 |
"""}
|
| 391 |
+
{"role": "user", "content": f"Context: {text}\n\nQuestion: {question}"}
|
| 392 |
]
|
| 393 |
|
| 394 |
response = qa_pipeline(messages, max_new_tokens=256)[0]['generated_text']
|
|
|
|
| 440 |
|
| 441 |
answer_button.click(
|
| 442 |
answer_question,
|
| 443 |
+
inputs=[full_text_output, question_input],
|
| 444 |
outputs=[answer_output]
|
| 445 |
)
|
| 446 |
|