eagle0504 commited on
Commit
b7de3e2
·
verified ·
1 Parent(s): c66249c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -129,9 +129,14 @@ elif uploaded_files:
129
  refs_tab = refs_tab.head(math.ceil(top_n))
130
  result = refs_tab
131
 
 
 
 
132
  # Display assistant response in chat message container
133
  with st.chat_message("assistant"):
134
- st.table(result)
 
 
135
 
136
  # Add assistant response to chat history
137
- st.session_state.messages.append({"role": "assistant", "content": result})
 
129
  refs_tab = refs_tab.head(math.ceil(top_n))
130
  result = refs_tab
131
 
132
+ # Call GPT
133
+ response = call_gpt(prompt, ' '.join(list(result.sentences)))
134
+
135
  # Display assistant response in chat message container
136
  with st.chat_message("assistant"):
137
+ st.write(response)
138
+ st.expander("See reference:")
139
+ st.table(result)
140
 
141
  # Add assistant response to chat history
142
+ st.session_state.messages.append({"role": "assistant", "content": response})