checkbox added
Browse files
app.py
CHANGED
@@ -61,6 +61,9 @@ with st.sidebar:
|
|
61 |
# Input filter
|
62 |
top_n = st.number_input("Insert a number (top n rows to be selected):")
|
63 |
|
|
|
|
|
|
|
64 |
# Clear button
|
65 |
clear_button = st.sidebar.button("Clear Conversation", key="clear")
|
66 |
|
@@ -126,6 +129,9 @@ elif uploaded_files:
|
|
126 |
|
127 |
# Display assistant response in chat message container
|
128 |
with st.chat_message("assistant"):
|
129 |
-
|
|
|
|
|
|
|
130 |
# Add assistant response to chat history
|
131 |
st.session_state.messages.append({"role": "assistant", "content": result})
|
|
|
61 |
# Input filter
|
62 |
top_n = st.number_input("Insert a number (top n rows to be selected):")
|
63 |
|
64 |
+
# Use dictionary
|
65 |
+
use_dict_format = st.checkbox("Use dictionary format.")
|
66 |
+
|
67 |
# Clear button
|
68 |
clear_button = st.sidebar.button("Clear Conversation", key="clear")
|
69 |
|
|
|
129 |
|
130 |
# Display assistant response in chat message container
|
131 |
with st.chat_message("assistant"):
|
132 |
+
if not use_dict_format:
|
133 |
+
st.table(result)
|
134 |
+
else:
|
135 |
+
st.write(result.to_json())
|
136 |
# Add assistant response to chat history
|
137 |
st.session_state.messages.append({"role": "assistant", "content": result})
|