Update app.py
Browse files
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.
|
|
|
|
|
135 |
|
136 |
# Add assistant response to chat history
|
137 |
-
st.session_state.messages.append({"role": "assistant", "content":
|
|
|
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})
|