Spaces:
Runtime error
Runtime error
shripadbhat
commited on
Commit
•
3efe6ba
1
Parent(s):
41918c9
Update app.py
Browse files
app.py
CHANGED
@@ -11,10 +11,13 @@ document_text = st.text_area("Document Text", "", height=100)
|
|
11 |
query = st.text_input("Query")
|
12 |
|
13 |
|
14 |
-
if st.button("Get Answers From Document"):
|
|
|
|
|
15 |
answers_lines = qa.fetch_answers(query, document_text).splitlines()
|
16 |
answer_first = answers_lines[0]
|
17 |
reference_first = answers_lines[1]
|
|
|
18 |
st.header("ANSWER: "+answer_first)
|
19 |
st.subheader("REFERENCE: "+reference_first)
|
20 |
#st.markdown()
|
|
|
11 |
query = st.text_input("Query")
|
12 |
|
13 |
|
14 |
+
#if st.button("Get Answers From Document"):
|
15 |
+
if len(document_text.strip()) > 0 and len(query.strip()) > 0:
|
16 |
+
st.write('Fetching answer...')
|
17 |
answers_lines = qa.fetch_answers(query, document_text).splitlines()
|
18 |
answer_first = answers_lines[0]
|
19 |
reference_first = answers_lines[1]
|
20 |
+
st.write('Check the answer...with reference text')
|
21 |
st.header("ANSWER: "+answer_first)
|
22 |
st.subheader("REFERENCE: "+reference_first)
|
23 |
#st.markdown()
|