prasadnu commited on
Commit
bde0f9c
ยท
1 Parent(s): f6886b7

change container width param

Browse files
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_column_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_column_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_column_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_column_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_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,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_column_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_container_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_container_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_container_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_container_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_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
  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
 
pages/Multimodal_Conversational_Search.py CHANGED
@@ -142,7 +142,7 @@ service = 'es'
142
  def write_logo():
143
  col1, col2, col3 = st.columns([5, 1, 5])
144
  with col2:
145
- st.image(AI_ICON, use_column_width='always')
146
 
147
  def write_top_bar():
148
  col1, col2 = st.columns([77,23])
@@ -150,7 +150,7 @@ def write_top_bar():
150
  st.write("")
151
  st.header("Chat with your data",divider='rainbow')
152
 
153
- #st.image(AI_ICON, use_column_width='always')
154
 
155
  with col2:
156
  st.write("")
@@ -238,7 +238,7 @@ def write_user_message(md):
238
  col1, col2 = st.columns([3,97])
239
 
240
  with col1:
241
- st.image(USER_ICON, use_column_width='always')
242
  with col2:
243
  #st.warning(md['question'])
244
 
@@ -251,7 +251,7 @@ def render_answer(question,answer,index,res_img):
251
 
252
  col1, col2, col_3 = st.columns([4,74,22])
253
  with col1:
254
- st.image(AI_ICON, use_column_width='always')
255
  with col2:
256
  ans_ = answer['answer']
257
  st.write(ans_)
 
142
  def write_logo():
143
  col1, col2, col3 = st.columns([5, 1, 5])
144
  with col2:
145
+ st.image(AI_ICON, use_container_width='always')
146
 
147
  def write_top_bar():
148
  col1, col2 = st.columns([77,23])
 
150
  st.write("")
151
  st.header("Chat with your data",divider='rainbow')
152
 
153
+ #st.image(AI_ICON, use_container_width='always')
154
 
155
  with col2:
156
  st.write("")
 
238
  col1, col2 = st.columns([3,97])
239
 
240
  with col1:
241
+ st.image(USER_ICON, use_container_width='always')
242
  with col2:
243
  #st.warning(md['question'])
244
 
 
251
 
252
  col1, col2, col_3 = st.columns([4,74,22])
253
  with col1:
254
+ st.image(AI_ICON, use_container_width='always')
255
  with col2:
256
  ans_ = answer['answer']
257
  st.write(ans_)
pages/Semantic_Search.py CHANGED
@@ -605,7 +605,7 @@ def write_top_bar():
605
  # st.write("")
606
  col1, col2,col3,col4 = st.columns([2.5,35,8,7])
607
  with col1:
608
- st.image(TEXT_ICON, use_column_width='always')
609
  with col2:
610
  #st.markdown("")
611
  input = st.text_input( "Ask here",label_visibility = "collapsed",key="input_text",placeholder = "Type your query")
@@ -618,7 +618,7 @@ def write_top_bar():
618
  col5, col6 = st.columns([4.5,95])
619
 
620
  with col5:
621
- st.image(IMAGE_ICON, use_column_width='always')
622
  with col6:
623
  with st.expander(':green[Search by using an image]'):
624
  tab2, tab1 = st.tabs(["Upload Image","Generate Image by AI"])
@@ -949,7 +949,7 @@ def write_user_message(md,ans):
949
  col1, col2, col3 = st.columns([3,40,20])
950
 
951
  with col1:
952
- st.image(USER_ICON, use_column_width='always')
953
  with col2:
954
  #st.warning(md['question'])
955
  st.markdown("<div style='fontSize:15px;padding:3px 7px 3px 7px;borderWidth: 0px;borderColor: red;borderStyle: solid;width: fit-content;height: fit-content;border-radius: 10px;'>Input Text: </div><div style='fontSize:25px;padding:3px 7px 3px 7px;borderWidth: 0px;borderColor: red;borderStyle: solid;width: fit-content;height: fit-content;border-radius: 10px;font-style: italic;color:#e28743'>"+md['question']+"</div>", unsafe_allow_html = True)
@@ -1001,7 +1001,7 @@ def write_user_message(md,ans):
1001
  def render_answer(answer,index):
1002
  column1, column2 = st.columns([6,90])
1003
  with column1:
1004
- st.image(AI_ICON, use_column_width='always')
1005
  with column2:
1006
  st.markdown("<div style='fontSize:25px;padding:3px 7px 3px 7px;borderWidth: 0px;borderColor: red;borderStyle: solid;width: fit-content;height: fit-content;border-radius: 10px;'>Results </div>", unsafe_allow_html = True)
1007
  if(st.session_state.input_evaluate == "enabled" and st.session_state.input_ndcg > 0):
@@ -1175,7 +1175,7 @@ def render_answer(answer,index):
1175
 
1176
  placeholder__ = st.empty()
1177
 
1178
- placeholder__.button("๐Ÿ”„",key=rdn_key,on_click=on_button_click, help = "This will regenerate the responses with new settings that you entered, Note: To see difference in responses, you should change any of the applicable settings")#,type="primary",use_column_width=True)
1179
 
1180
  if(filter_out > 0):
1181
  placeholder_no_results.text(str(filter_out)+" result(s) removed due to missing or in-appropriate content")
 
605
  # st.write("")
606
  col1, col2,col3,col4 = st.columns([2.5,35,8,7])
607
  with col1:
608
+ st.image(TEXT_ICON, use_container_width='always')
609
  with col2:
610
  #st.markdown("")
611
  input = st.text_input( "Ask here",label_visibility = "collapsed",key="input_text",placeholder = "Type your query")
 
618
  col5, col6 = st.columns([4.5,95])
619
 
620
  with col5:
621
+ st.image(IMAGE_ICON, use_container_width='always')
622
  with col6:
623
  with st.expander(':green[Search by using an image]'):
624
  tab2, tab1 = st.tabs(["Upload Image","Generate Image by AI"])
 
949
  col1, col2, col3 = st.columns([3,40,20])
950
 
951
  with col1:
952
+ st.image(USER_ICON, use_container_width='always')
953
  with col2:
954
  #st.warning(md['question'])
955
  st.markdown("<div style='fontSize:15px;padding:3px 7px 3px 7px;borderWidth: 0px;borderColor: red;borderStyle: solid;width: fit-content;height: fit-content;border-radius: 10px;'>Input Text: </div><div style='fontSize:25px;padding:3px 7px 3px 7px;borderWidth: 0px;borderColor: red;borderStyle: solid;width: fit-content;height: fit-content;border-radius: 10px;font-style: italic;color:#e28743'>"+md['question']+"</div>", unsafe_allow_html = True)
 
1001
  def render_answer(answer,index):
1002
  column1, column2 = st.columns([6,90])
1003
  with column1:
1004
+ st.image(AI_ICON, use_container_width='always')
1005
  with column2:
1006
  st.markdown("<div style='fontSize:25px;padding:3px 7px 3px 7px;borderWidth: 0px;borderColor: red;borderStyle: solid;width: fit-content;height: fit-content;border-radius: 10px;'>Results </div>", unsafe_allow_html = True)
1007
  if(st.session_state.input_evaluate == "enabled" and st.session_state.input_ndcg > 0):
 
1175
 
1176
  placeholder__ = st.empty()
1177
 
1178
+ placeholder__.button("๐Ÿ”„",key=rdn_key,on_click=on_button_click, help = "This will regenerate the responses with new settings that you entered, Note: To see difference in responses, you should change any of the applicable settings")#,type="primary",use_container_width=True)
1179
 
1180
  if(filter_out > 0):
1181
  placeholder_no_results.text(str(filter_out)+" result(s) removed due to missing or in-appropriate content")