mtyrrell commited on
Commit
b620d1c
1 Parent(s): e20c2ed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -24
app.py CHANGED
@@ -99,7 +99,7 @@ def get_refs(res):
99
 
100
  def run_query(input_text, country):
101
  docs = get_docs(input_text, country)
102
- st.write('Selected country: ', country) # Debugging country
103
  res = pipe.run(query=input_text, documents=docs)
104
  output = res["results"][0]
105
  st.write('Response')
@@ -108,29 +108,6 @@ def run_query(input_text, country):
108
  st.write('References')
109
  st.markdown(references, unsafe_allow_html=True)
110
 
111
-
112
- # def run_query(input_text):
113
- # docs = get_docs(input_text)
114
- # st.write('Debug: Documents', docs) # Debugging output
115
-
116
- # res = pipe.run(query=input_text, documents=docs)
117
- # st.write('Debug: Results', res) # Debugging output
118
-
119
- # output = res["results"][0]
120
- # st.write('Response')
121
- # st.success(str(output))
122
-
123
- # references = get_refs(res)
124
- # st.write('Debug: References', references) # Debugging output
125
-
126
- # st.write('References')
127
- # if references:
128
- # st.success(str(references))
129
- # else:
130
- # st.warning('No references found.')
131
-
132
-
133
-
134
  # Setup retriever, pulling from local faiss datastore
135
  retriever = EmbeddingRetriever(
136
  document_store=FAISSDocumentStore.load(
 
99
 
100
  def run_query(input_text, country):
101
  docs = get_docs(input_text, country)
102
+ # st.write('Selected country: ', country) # Debugging country
103
  res = pipe.run(query=input_text, documents=docs)
104
  output = res["results"][0]
105
  st.write('Response')
 
108
  st.write('References')
109
  st.markdown(references, unsafe_allow_html=True)
110
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  # Setup retriever, pulling from local faiss datastore
112
  retriever = EmbeddingRetriever(
113
  document_store=FAISSDocumentStore.load(