Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
|
|
|
| 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.")
|