Prageeth-1 commited on
Commit
64b701e
·
verified ·
1 Parent(s): 730d4ef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -262,7 +262,8 @@ with tab2:
262
  question_1 = st.text_input("Enter your question:", key="question_input")
263
  if st.button("Get Answer", key="get_answer_1"):
264
  if context_1 and question_1:
265
- answer_1 = qa_pipeline({'context': context_1, 'question': question_1})
 
266
  st.success(f"Answer: {answer_1['answer']}")
267
  else:
268
  st.warning("Provide both context and question.")
 
262
  question_1 = st.text_input("Enter your question:", key="question_input")
263
  if st.button("Get Answer", key="get_answer_1"):
264
  if context_1 and question_1:
265
+ qa_pipeline = load_qa_model()
266
+ answer_1 = qa_pipeline(question=question_1, context=context_1)
267
  st.success(f"Answer: {answer_1['answer']}")
268
  else:
269
  st.warning("Provide both context and question.")