Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -45,7 +45,8 @@ if option == "Extractive question answering":
|
|
45 |
question_answerer = question_model()
|
46 |
with st.spinner(text="Getting answer..."):
|
47 |
answer = question_answerer(context=context, question=question)
|
48 |
-
|
|
|
49 |
elif source == "I want to upload a file":
|
50 |
uploaded_file = st.file_uploader("Choose a .txt file to upload", type=["txt"])
|
51 |
question = st.text_input(label='Enter your question')
|
|
|
45 |
question_answerer = question_model()
|
46 |
with st.spinner(text="Getting answer..."):
|
47 |
answer = question_answerer(context=context, question=question)
|
48 |
+
answer = answer["answer"]
|
49 |
+
st.write(f"Answer: {answer}")
|
50 |
elif source == "I want to upload a file":
|
51 |
uploaded_file = st.file_uploader("Choose a .txt file to upload", type=["txt"])
|
52 |
question = st.text_input(label='Enter your question')
|