vonshed commited on
Commit
f3fcafe
1 Parent(s): c0c5b8b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -29,7 +29,7 @@ uploaded_file = st.sidebar.file_uploader("Choose a CSV file", type=["csv"])
29
  if uploaded_file is not None:
30
  # Read the CSV file
31
  df = pd.read_csv(uploaded_file)
32
-
33
  # Show the contents of the CSV file in the main area
34
  #st.write(df)
35
  else:
@@ -175,6 +175,7 @@ if prompt := st.chat_input(f"Hi I'm {selected_model}, how are you?"):
175
  # Display user message in chat message container
176
  with st.chat_message("user"):
177
  st.markdown(prompt)
 
178
  # Add user message to chat history
179
 
180
 
@@ -197,4 +198,5 @@ if prompt := st.chat_input(f"Hi I'm {selected_model}, how are you?"):
197
  )
198
 
199
  response = st.write_stream(stream)
200
- st.session_state.messages.append({"role": "assistant", "content": response})
 
 
29
  if uploaded_file is not None:
30
  # Read the CSV file
31
  df = pd.read_csv(uploaded_file)
32
+ df.save_to_disk("answers.csv")
33
  # Show the contents of the CSV file in the main area
34
  #st.write(df)
35
  else:
 
175
  # Display user message in chat message container
176
  with st.chat_message("user"):
177
  st.markdown(prompt)
178
+
179
  # Add user message to chat history
180
 
181
 
 
198
  )
199
 
200
  response = st.write_stream(stream)
201
+ st.session_state.messages.append({"role": "assistant", "content": response})
202
+