eagle0504 commited on
Commit
bae639d
1 Parent(s): d896bfe

app updated

Browse files
Files changed (1) hide show
  1. app.py +3 -8
app.py CHANGED
@@ -66,11 +66,9 @@ with st.sidebar:
66
  "Insert a number (top n rows to be selected):", value=5, step=1
67
  )
68
 
69
- # Use dictionary
70
- use_dict_format = st.checkbox("Use dictionary format.", value=True)
71
-
72
  # Clear button
73
  clear_button = st.sidebar.button("Clear Conversation", key="clear")
 
74
  # Credit
75
  current_year = current_year() # This will print the current year
76
  st.markdown(
@@ -117,7 +115,7 @@ elif uploaded_files:
117
  refs_tab = query_search(
118
  "pful for understanding federal income", documents, query_database, sources
119
  )
120
- refs_tab.head(math.ceil(top_n))
121
 
122
  # React to user input
123
  if prompt := st.chat_input("What is up?"):
@@ -130,9 +128,6 @@ elif uploaded_files:
130
 
131
  # Display assistant response in chat message container
132
  with st.chat_message("assistant"):
133
- if not use_dict_format:
134
- st.table(result)
135
- else:
136
- st.write(result.to_json())
137
  # Add assistant response to chat history
138
  st.session_state.messages.append({"role": "assistant", "content": result})
 
66
  "Insert a number (top n rows to be selected):", value=5, step=1
67
  )
68
 
 
 
 
69
  # Clear button
70
  clear_button = st.sidebar.button("Clear Conversation", key="clear")
71
+
72
  # Credit
73
  current_year = current_year() # This will print the current year
74
  st.markdown(
 
115
  refs_tab = query_search(
116
  "pful for understanding federal income", documents, query_database, sources
117
  )
118
+ refs_tab = refs_tab.head(math.ceil(top_n))
119
 
120
  # React to user input
121
  if prompt := st.chat_input("What is up?"):
 
128
 
129
  # Display assistant response in chat message container
130
  with st.chat_message("assistant"):
131
+ st.table(result)
 
 
 
132
  # Add assistant response to chat history
133
  st.session_state.messages.append({"role": "assistant", "content": result})