Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -45,7 +45,7 @@ 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 |
-
st.write(f"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')
|
|
@@ -54,7 +54,7 @@ if option == "Extractive question answering":
|
|
| 54 |
question_answerer = question_model()
|
| 55 |
with st.spinner(text="Getting answer..."):
|
| 56 |
answer = question_answerer(context=uploaded_file, question=question)
|
| 57 |
-
st.write(f"Answer: {answer
|
| 58 |
|
| 59 |
elif option == 'Text summarization':
|
| 60 |
st.markdown("<h2 style='text-align: center; color:red;'>Summarize text</h2>", unsafe_allow_html=True)
|
|
|
|
| 45 |
question_answerer = question_model()
|
| 46 |
with st.spinner(text="Getting answer..."):
|
| 47 |
answer = question_answerer(context=context, question=question)
|
| 48 |
+
st.write(f"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')
|
|
|
|
| 54 |
question_answerer = question_model()
|
| 55 |
with st.spinner(text="Getting answer..."):
|
| 56 |
answer = question_answerer(context=uploaded_file, question=question)
|
| 57 |
+
st.write(f"Answer: {answer}")
|
| 58 |
|
| 59 |
elif option == 'Text summarization':
|
| 60 |
st.markdown("<h2 style='text-align: center; color:red;'>Summarize text</h2>", unsafe_allow_html=True)
|