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