peter2000 commited on
Commit
d4c667e
β€’
1 Parent(s): caaaadb

Update appStore/keyword_search.py

Browse files
Files changed (1) hide show
  1. appStore/keyword_search.py +6 -2
appStore/keyword_search.py CHANGED
@@ -76,9 +76,13 @@ def app():
76
  with st.container():
77
  question = st.text_input("Please enter your question here, we will look for the answer in the document.",
78
  value="Which extreme weather is a particular risk?",)
 
79
  if st.button("Find them."):
80
- pipeline = st.session_state['pipeline']
81
- if pipeline is not None:
 
 
 
82
  with st.spinner("πŸ‘‘ Performing semantic search on"):#+file.name+"..."):
83
  try:
84
  msg = 'Asked ' + question
 
76
  with st.container():
77
  question = st.text_input("Please enter your question here, we will look for the answer in the document.",
78
  value="Which extreme weather is a particular risk?",)
79
+
80
  if st.button("Find them."):
81
+ document = st.session_state['document']
82
+ pipeline = start_haystack(document)
83
+
84
+ if document is not None:
85
+
86
  with st.spinner("πŸ‘‘ Performing semantic search on"):#+file.name+"..."):
87
  try:
88
  msg = 'Asked ' + question