Kr08 commited on
Commit
9eda364
·
verified ·
1 Parent(s): ef745e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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: {''.join(item['translated'] for item in context if 'translated' in item)}\n\nQuestion: {question}"}
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=[translation_output, question_input],
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