victor7246 commited on
Commit
5d7e5fe
·
verified ·
1 Parent(s): 27f61f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -185,7 +185,7 @@ if __name__ == '__main__':
185
  response = ""
186
 
187
  responses.append(response)
188
- st.session_state['history'].append(db_chain.intermediate_steps.get("result",'') + "\n SQLQuery \n" + db_chain.intermediate_steps.get("sql_cmd",''))
189
 
190
  response = "\n\n".join(responses)
191
  if response == "":
@@ -218,7 +218,7 @@ if __name__ == '__main__':
218
  if "SQLQuery" in response or "Answer:" in response:
219
  response = "Sorry I may not have answer to this question."
220
 
221
- st.session_state['history'].append(db_chain.intermediate_steps.get("result",'') + "\n SQLQuery \n" + db_chain.intermediate_steps.get("sql_cmd",''))
222
 
223
  if response == "Sorry I may not have answer to this question.":
224
  st.session_state.ask_user_selection = True
@@ -269,7 +269,7 @@ if __name__ == '__main__':
269
  response = ""
270
 
271
  responses.append(response)
272
- st.session_state['history'].append(db_chain.intermediate_steps.get("result",'') + "\n SQLQuery \n" + db_chain.intermediate_steps.get("sql_cmd",''))
273
 
274
  response = "\n\n".join(responses)
275
  if response == "":
@@ -299,7 +299,7 @@ if __name__ == '__main__':
299
  if "SQLQuery" in response or "Answer:" in response:
300
  response = "Sorry I may not have answer to this question."
301
 
302
- st.session_state['history'].append(db_chain.intermediate_steps.get("result",'') + "\n SQLQuery \n" + db_chain.intermediate_steps.get("sql_cmd",''))
303
 
304
  if response == "Sorry I may not have answer to this question.":
305
  st.session_state.ask_user_selection = True
@@ -344,7 +344,7 @@ if __name__ == '__main__':
344
  if "SQLQuery" in response or "Answer:" in response:
345
  response = "Sorry I still cannot answer to this question."
346
 
347
- st.session_state['history'].append(db_chain.intermediate_steps.get("result",'') + "\n SQLQuery \n" + db_chain.intermediate_steps.get("sql_cmd",''))
348
 
349
  st.session_state.ask_user_selection = False
350
  st.session_state.prev_selection = []
 
185
  response = ""
186
 
187
  responses.append(response)
188
+ st.session_state['history'].append(db_chain.intermediate_steps.get("sql_cmd",''))
189
 
190
  response = "\n\n".join(responses)
191
  if response == "":
 
218
  if "SQLQuery" in response or "Answer:" in response:
219
  response = "Sorry I may not have answer to this question."
220
 
221
+ st.session_state['history'].append(db_chain.intermediate_steps.get("sql_cmd",''))
222
 
223
  if response == "Sorry I may not have answer to this question.":
224
  st.session_state.ask_user_selection = True
 
269
  response = ""
270
 
271
  responses.append(response)
272
+ st.session_state['history'].append(db_chain.intermediate_steps.get("sql_cmd",''))
273
 
274
  response = "\n\n".join(responses)
275
  if response == "":
 
299
  if "SQLQuery" in response or "Answer:" in response:
300
  response = "Sorry I may not have answer to this question."
301
 
302
+ st.session_state['history'].append(db_chain.intermediate_steps.get("sql_cmd",''))
303
 
304
  if response == "Sorry I may not have answer to this question.":
305
  st.session_state.ask_user_selection = True
 
344
  if "SQLQuery" in response or "Answer:" in response:
345
  response = "Sorry I still cannot answer to this question."
346
 
347
+ st.session_state['history'].append(db_chain.intermediate_steps.get("sql_cmd",''))
348
 
349
  st.session_state.ask_user_selection = False
350
  st.session_state.prev_selection = []