Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 - "
|
| 87 |
print (db_chain.intermediate_steps.get("result",''))
|
| 88 |
-
st.markdown("The SQL query is - "
|
| 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.
|
| 93 |
-
st.markdown("The SQL query is - "
|
| 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:
|