prasadnu commited on
Commit
f6886b7
·
1 Parent(s): 30cb160

git ignore

Browse files
Files changed (1) hide show
  1. pages/AI_Shopping_Assistant.py +8 -8
pages/AI_Shopping_Assistant.py CHANGED
@@ -163,7 +163,7 @@ st.markdown("""
163
  def write_logo():
164
  col1, col2, col3 = st.columns([5, 1, 5])
165
  with col2:
166
- st.image(AI_ICON, use_container_width='always')
167
 
168
  def write_top_bar():
169
  col1, col2 = st.columns([77,23])
@@ -171,7 +171,7 @@ def write_top_bar():
171
  st.page_link("app.py", label=":orange[Home]", icon="🏠")
172
  st.header("AI Shopping assistant",divider='rainbow')
173
 
174
- #st.image(AI_ICON, use_container_width='always')
175
 
176
  with col2:
177
  st.write("")
@@ -259,7 +259,7 @@ def write_user_message(md):
259
  col1, col2 = st.columns([3,97])
260
 
261
  with col1:
262
- st.image(USER_ICON, use_container_width='always')
263
  with col2:
264
  #st.warning(md['question'])
265
 
@@ -272,7 +272,7 @@ def render_answer(question,answer,index):
272
 
273
  col1, col2, col_3 = st.columns([4,74,22])
274
  with col1:
275
- st.image(AI_ICON, use_container_width='always')
276
  with col2:
277
  use_interim_results = False
278
  src_dict = {}
@@ -302,11 +302,11 @@ def render_answer(question,answer,index):
302
  resizedImg = img.resize((230, 180), Image.Resampling.LANCZOS)
303
  if(index ==0):
304
  with img_col1:
305
- st.image(resizedImg,use_container_width = True,caption = item['title'])
306
  if(index ==1):
307
  with img_col2:
308
- st.image(resizedImg,use_container_width = True,caption = item['title'])
309
- #st.image(parent_dirname+"/retrieved_esci_images/"+item['id']+"_resized.jpg",caption = item['title'],use_container_width = True)
310
 
311
 
312
  if(answer['last_tool']['name'] == "generate_images" or answer['last_tool']['name'] == "get_any_general_recommendation"):
@@ -322,7 +322,7 @@ def render_answer(question,answer,index):
322
  img_ = Image.open(BytesIO(s3_stream))
323
  resizedImg = img_.resize((230, 180), Image.Resampling.LANCZOS)
324
  with gen_img_col1:
325
- st.image(resizedImg,caption = "Generated image for "+key.split(".")[0],use_container_width = True)
326
  st.write("<br>",unsafe_allow_html = True)
327
 
328
 
 
163
  def write_logo():
164
  col1, col2, col3 = st.columns([5, 1, 5])
165
  with col2:
166
+ st.image(AI_ICON, use_column_width='always')
167
 
168
  def write_top_bar():
169
  col1, col2 = st.columns([77,23])
 
171
  st.page_link("app.py", label=":orange[Home]", icon="🏠")
172
  st.header("AI Shopping assistant",divider='rainbow')
173
 
174
+ #st.image(AI_ICON, use_column_width='always')
175
 
176
  with col2:
177
  st.write("")
 
259
  col1, col2 = st.columns([3,97])
260
 
261
  with col1:
262
+ st.image(USER_ICON, use_column_width='always')
263
  with col2:
264
  #st.warning(md['question'])
265
 
 
272
 
273
  col1, col2, col_3 = st.columns([4,74,22])
274
  with col1:
275
+ st.image(AI_ICON, use_column_width='always')
276
  with col2:
277
  use_interim_results = False
278
  src_dict = {}
 
302
  resizedImg = img.resize((230, 180), Image.Resampling.LANCZOS)
303
  if(index ==0):
304
  with img_col1:
305
+ st.image(resizedImg,use_column_width = True,caption = item['title'])
306
  if(index ==1):
307
  with img_col2:
308
+ st.image(resizedImg,use_column_width = True,caption = item['title'])
309
+ #st.image(parent_dirname+"/retrieved_esci_images/"+item['id']+"_resized.jpg",caption = item['title'],use_column_width = True)
310
 
311
 
312
  if(answer['last_tool']['name'] == "generate_images" or answer['last_tool']['name'] == "get_any_general_recommendation"):
 
322
  img_ = Image.open(BytesIO(s3_stream))
323
  resizedImg = img_.resize((230, 180), Image.Resampling.LANCZOS)
324
  with gen_img_col1:
325
+ st.image(resizedImg,caption = "Generated image for "+key.split(".")[0],use_column_width = True)
326
  st.write("<br>",unsafe_allow_html = True)
327
 
328