Spaces:
Sleeping
Sleeping
Update QuestionAnswering.py
Browse files- QuestionAnswering.py +2 -2
QuestionAnswering.py
CHANGED
|
@@ -46,14 +46,14 @@ def main():
|
|
| 46 |
if upload_file is not None:
|
| 47 |
question = upload_file.read().decode("utf-8")
|
| 48 |
|
| 49 |
-
for line in
|
| 50 |
line = line.strip()
|
| 51 |
if not line:
|
| 52 |
continue
|
| 53 |
|
| 54 |
prediction = predict(line, text)
|
| 55 |
|
| 56 |
-
st.success(line + "\n\
|
| 57 |
|
| 58 |
|
| 59 |
# Create a prediction button
|
|
|
|
| 46 |
if upload_file is not None:
|
| 47 |
question = upload_file.read().decode("utf-8")
|
| 48 |
|
| 49 |
+
for line in question.splitlines():
|
| 50 |
line = line.strip()
|
| 51 |
if not line:
|
| 52 |
continue
|
| 53 |
|
| 54 |
prediction = predict(line, text)
|
| 55 |
|
| 56 |
+
st.success(line + "\n\nAnswer: " + prediction)
|
| 57 |
|
| 58 |
|
| 59 |
# Create a prediction button
|