bigghuggs commited on
Commit
fe6d263
·
verified ·
1 Parent(s): 81500c0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -710,7 +710,7 @@ def roomItemClick(evt: gr.SelectData, seshid):
710
  try:
711
  item = evt.value['caption']
712
  replacements = [(product['img'] if itemi in sesh.inbudget[sesh.current_img_signature][item] else sesh.default_img, product['price']) for itemi,product in enumerate(sesh.item_data[sesh.current_img_signature][sesh.room_type][sesh.room_style][sesh.price][sesh.Paletteid][item])]
713
- return gr.Column(scale=4), gr.update(visible=bool(1)), gr.update(visible=bool(0)), gr.update(visible=bool(0)), gr.Gallery(replacements, 'Item Replacements', rows=1, columns=7, visible=True, interactive=True, height=150), gr.Label(visible=False), gr.update(visible=bool(0)), seshid
714
  except:
715
  return gr.Column(scale=5), gr.update(visible=bool(0)), gr.update(visible=bool(0)), gr.update(visible=bool(0)), gr.Gallery([], 'Item Replacements', rows=1, columns=7, visible=False, interactive=True, height=150), gr.Label(visible=True), gr.update(visible=bool(0)), seshid
716
 
@@ -1552,7 +1552,7 @@ with gr.Blocks(theme=gr.themes.Monochrome(), js=js_func) as demo:
1552
  #room_ad = gr.Image("C:\\Users\\Wayne\\Downloads\\list with us.gif", show_label=False, show_download_button=False)
1553
  room_ad = gr.Textbox(visible=False)
1554
  with gr.Accordion(label='Select Design Style', open=False) as design_accordion:
1555
- design_gallery = gr.Gallery(design_images, label="Design Styles", preview=True, height=300, interactive=True)
1556
  price_radio = gr.Radio(['Affordable', 'Upmarket'], label='Price Point', interactive=True, visible=True, value='Affordable')
1557
  bedsize_radio = gr.Radio(['Full', 'Queen', 'King'], value='Queen', label='Bed Size', interactive=True, visible=True)
1558
  with gr.Accordion(label='Update Property Data', open=False) as update_accordion:
@@ -1563,7 +1563,7 @@ with gr.Blocks(theme=gr.themes.Monochrome(), js=js_func) as demo:
1563
  choose_room = gr.Gallery(label="Room To Decorate", height=200, interactive=True)
1564
  with gr.Accordion(label='Select Room Type', open=False):
1565
  room2decorate = gr.Image(label='Working Room', height=150)
1566
- rooms_gallery = gr.Gallery([(v,k) for k,v in bedrooms.items()], label="Room Type", height=200, interactive=True)
1567
 
1568
  with gr.Column(scale=1, visible=False) as colors_side:
1569
  #close4 = gr.Button('Close')
@@ -1575,7 +1575,7 @@ with gr.Blocks(theme=gr.themes.Monochrome(), js=js_func) as demo:
1575
  journeys = gr.Button('Journeys', size='sm', min_width=45)
1576
  #dsdsd = gr.Image("C:\\Users\\Wayne\\Downloads\\local ad.gif", show_label=False, show_download_button=False)
1577
  with gr.Group(visible=True) as palettes_div:
1578
- color_Palettes = gr.Gallery(label='Proposed Color Palettes', columns=2, height=300, interactive=True)
1579
  with gr.Group(visible=False) as script_div:
1580
  status_text = gr.Textbox("loading info for color and character\nstand by...\n", show_label=True, interactive=False, lines=3, label='Status')
1581
  scripts_drop = gr.Dropdown(label='Scripts', interactive=True)
 
710
  try:
711
  item = evt.value['caption']
712
  replacements = [(product['img'] if itemi in sesh.inbudget[sesh.current_img_signature][item] else sesh.default_img, product['price']) for itemi,product in enumerate(sesh.item_data[sesh.current_img_signature][sesh.room_type][sesh.room_style][sesh.price][sesh.Paletteid][item])]
713
+ return gr.Column(scale=4), gr.update(visible=bool(1)), gr.update(visible=bool(0)), gr.update(visible=bool(0)), gr.Gallery(replacements, 'Item Replacements', rows=1, columns=7, visible=True, interactive=True), gr.Label(visible=False), gr.update(visible=bool(0)), seshid
714
  except:
715
  return gr.Column(scale=5), gr.update(visible=bool(0)), gr.update(visible=bool(0)), gr.update(visible=bool(0)), gr.Gallery([], 'Item Replacements', rows=1, columns=7, visible=False, interactive=True, height=150), gr.Label(visible=True), gr.update(visible=bool(0)), seshid
716
 
 
1552
  #room_ad = gr.Image("C:\\Users\\Wayne\\Downloads\\list with us.gif", show_label=False, show_download_button=False)
1553
  room_ad = gr.Textbox(visible=False)
1554
  with gr.Accordion(label='Select Design Style', open=False) as design_accordion:
1555
+ design_gallery = gr.Gallery(design_images, label="Design Styles", preview=True, interactive=True)
1556
  price_radio = gr.Radio(['Affordable', 'Upmarket'], label='Price Point', interactive=True, visible=True, value='Affordable')
1557
  bedsize_radio = gr.Radio(['Full', 'Queen', 'King'], value='Queen', label='Bed Size', interactive=True, visible=True)
1558
  with gr.Accordion(label='Update Property Data', open=False) as update_accordion:
 
1563
  choose_room = gr.Gallery(label="Room To Decorate", height=200, interactive=True)
1564
  with gr.Accordion(label='Select Room Type', open=False):
1565
  room2decorate = gr.Image(label='Working Room', height=150)
1566
+ rooms_gallery = gr.Gallery([(v,k) for k,v in bedrooms.items()], label="Room Type", interactive=True)
1567
 
1568
  with gr.Column(scale=1, visible=False) as colors_side:
1569
  #close4 = gr.Button('Close')
 
1575
  journeys = gr.Button('Journeys', size='sm', min_width=45)
1576
  #dsdsd = gr.Image("C:\\Users\\Wayne\\Downloads\\local ad.gif", show_label=False, show_download_button=False)
1577
  with gr.Group(visible=True) as palettes_div:
1578
+ color_Palettes = gr.Gallery(label='Proposed Color Palettes', columns=2, interactive=True)
1579
  with gr.Group(visible=False) as script_div:
1580
  status_text = gr.Textbox("loading info for color and character\nstand by...\n", show_label=True, interactive=False, lines=3, label='Status')
1581
  scripts_drop = gr.Dropdown(label='Scripts', interactive=True)