shivanis14 commited on
Commit
4ede868
1 Parent(s): b6676fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -560,9 +560,9 @@ for message in st.session_state.messages:
560
 
561
  if product_name_by_user != "":
562
  # Add user message to chat history
563
- st.session_state.messages.append({"role": "user", "content": image_urls_str})
564
  with st.chat_message("user"):
565
- st.markdown(image_urls_str)
566
 
567
  # Prevent further input while generating response
568
  st.session_state["response_pending"] = True
@@ -577,6 +577,12 @@ if product_name_by_user != "":
577
 
578
  if len(similar_product_list) == 0 or choice == "None of the above":
579
  image_urls_str = st.text_input("Enter image URLs separated by commas")
 
 
 
 
 
 
580
  response = chatbot_response(image_urls_str, "", data_extractor_url, extract_info = True)
581
 
582
  st.session_state.messages.append({"role": "assistant", "content": response})
 
560
 
561
  if product_name_by_user != "":
562
  # Add user message to chat history
563
+ st.session_state.messages.append({"role": "user", "content": product_name_by_user})
564
  with st.chat_message("user"):
565
+ st.markdown(product_name_by_user)
566
 
567
  # Prevent further input while generating response
568
  st.session_state["response_pending"] = True
 
577
 
578
  if len(similar_product_list) == 0 or choice == "None of the above":
579
  image_urls_str = st.text_input("Enter image URLs separated by commas")
580
+
581
+ # Add user message to chat history
582
+ st.session_state.messages.append({"role": "user", "content": image_urls_str})
583
+ with st.chat_message("user"):
584
+ st.markdown(image_urls_str)
585
+
586
  response = chatbot_response(image_urls_str, "", data_extractor_url, extract_info = True)
587
 
588
  st.session_state.messages.append({"role": "assistant", "content": response})