victor7246 commited on
Commit
e789ac8
·
verified ·
1 Parent(s): 88df662

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -83,14 +83,14 @@ if __name__ == '__main__':
83
  print (db_chain)
84
  st.markdown("Sorry I cannot answer that. Please try again later.")
85
  elif db_chain.intermediate_steps.get("result",'') != '':
86
- st.markdown("Answer to your question is - ", db_chain.intermediate_steps.get("result",''))
87
  print (db_chain.intermediate_steps.get("result",''))
88
- st.markdown("The SQL query is - ", db_chain.intermediate_steps['sql_cmd'])
89
  elif db_chain.intermediate_steps.get("sql_data",'') != '':
90
  out = pd.DataFrame.from_dict(db_chain.intermediate_steps['sql_data'])
91
  st.markdown("Here is your result in a table format")
92
- st.write_table(out)
93
- st.markdown("The SQL query is - ", db_chain.intermediate_steps['sql_cmd'])
94
  else:
95
  st.markdown("Sorry I cannot answer that. Please try again later.")
96
  else:
 
83
  print (db_chain)
84
  st.markdown("Sorry I cannot answer that. Please try again later.")
85
  elif db_chain.intermediate_steps.get("result",'') != '':
86
+ st.markdown("Answer to your question is - " + db_chain.intermediate_steps.get("result",''))
87
  print (db_chain.intermediate_steps.get("result",''))
88
+ st.markdown("The SQL query is - " + db_chain.intermediate_steps['sql_cmd'])
89
  elif db_chain.intermediate_steps.get("sql_data",'') != '':
90
  out = pd.DataFrame.from_dict(db_chain.intermediate_steps['sql_data'])
91
  st.markdown("Here is your result in a table format")
92
+ st.table(out)
93
+ st.markdown("The SQL query is - " + db_chain.intermediate_steps['sql_cmd'])
94
  else:
95
  st.markdown("Sorry I cannot answer that. Please try again later.")
96
  else: