mdakhras commited on
Commit
296ac47
·
verified ·
1 Parent(s): 7c37cc7

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +19 -3
src/streamlit_app.py CHANGED
@@ -243,7 +243,12 @@ if cv_text:
243
  # Display the extracted information
244
  if extracted_info:
245
  st.subheader("Extracted Information")
246
- st.write(extracted_info)
 
 
 
 
 
247
  else:
248
  st.write("Could not extract information. Please try again.")
249
 
@@ -254,7 +259,13 @@ if cv_text:
254
  # Display the extracted information
255
  if extracted_criterions:
256
  st.subheader("Extracted Criterion List")
257
- st.write(extracted_criterions)
 
 
 
 
 
 
258
  else:
259
  st.write("Could not extract criterion information. Please try again.")
260
 
@@ -264,6 +275,11 @@ if cv_text:
264
  # Display the extracted information
265
  if extracted_weights:
266
  st.subheader("Extracted Weights List")
267
- st.write(extracted_weights)
 
 
 
 
 
268
  else:
269
  st.write("Could not extract weights information. Please try again.")
 
243
  # Display the extracted information
244
  if extracted_info:
245
  st.subheader("Extracted Information")
246
+ with st.chat_message("assistant", avatar="🤖"):
247
+ st.markdown(
248
+ f"<div class='chat-message assistant'>{extracted_info}</div>",
249
+ unsafe_allow_html=True,
250
+ )
251
+ # st.write(extracted_info)
252
  else:
253
  st.write("Could not extract information. Please try again.")
254
 
 
259
  # Display the extracted information
260
  if extracted_criterions:
261
  st.subheader("Extracted Criterion List")
262
+ # Immediately display the assistant's response
263
+ with st.chat_message("assistant", avatar="🤖"):
264
+ st.markdown(
265
+ f"<div class='chat-message assistant'>{extracted_criterions}</div>",
266
+ unsafe_allow_html=True,
267
+ )
268
+ # st.write(extracted_criterions)
269
  else:
270
  st.write("Could not extract criterion information. Please try again.")
271
 
 
275
  # Display the extracted information
276
  if extracted_weights:
277
  st.subheader("Extracted Weights List")
278
+ with st.chat_message("assistant", avatar="🤖"):
279
+ st.markdown(
280
+ f"<div class='chat-message assistant'>{extracted_weights}</div>",
281
+ unsafe_allow_html=True,
282
+ )
283
+ # st.write(extracted_weights)
284
  else:
285
  st.write("Could not extract weights information. Please try again.")