Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -49,8 +49,8 @@ if option == "Extractive question answering":
|
|
| 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 |
-
if uploaded_file:
|
| 53 |
-
context = st.text_area("", value=uploaded_file, height=330)
|
| 54 |
question = st.text_input(label="Enter your question")
|
| 55 |
button = st.button("Get answer")
|
| 56 |
if button:
|
|
|
|
| 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 |
+
if uploaded_file is not None:
|
| 53 |
+
context = st.text_area("", value=uploaded_file.read(), height=330)
|
| 54 |
question = st.text_input(label="Enter your question")
|
| 55 |
button = st.button("Get answer")
|
| 56 |
if button:
|