Spaces:
Running
Running
Commit
·
011e1bd
1
Parent(s):
272eebb
Update app.py
Browse files
app.py
CHANGED
@@ -38,15 +38,16 @@ def main():
|
|
38 |
st.warning("No questions entered.")
|
39 |
return
|
40 |
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
|
|
50 |
|
51 |
if __name__ == "__main__":
|
52 |
main()
|
|
|
38 |
st.warning("No questions entered.")
|
39 |
return
|
40 |
|
41 |
+
if st.button("Get Answers"):
|
42 |
+
# Perform question-answering
|
43 |
+
answers = question_answering(questions, pdf_text)
|
44 |
+
|
45 |
+
st.subheader("Questions and Answers:")
|
46 |
+
for i, (question, answer) in enumerate(zip(questions, answers)):
|
47 |
+
st.write(f"Question {i + 1}: '{question}'")
|
48 |
+
st.write("Answer:", answer['answer'])
|
49 |
+
st.write(f"Score: {answer['score']:.2f}") # Format the score to 2 decimal places
|
50 |
+
st.write("") # Add a new line after each answer
|
51 |
|
52 |
if __name__ == "__main__":
|
53 |
main()
|