Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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("
|
| 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("
|
| 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("
|
| 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("
|
| 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("
|
| 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 = []
|