bigghuggs commited on
Commit
5ad4810
·
verified ·
1 Parent(s): f71e861

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -1
app.py CHANGED
@@ -1941,6 +1941,10 @@ def selectScript(evt: gr.SelectData, seshid):
1941
  return 'Script being generated. Try again in 30 seconds.' if not data_dict or 'text' not in data_dict else data_dict['text']
1942
 
1943
 
 
 
 
 
1944
 
1945
  with gr.Blocks(theme=gr.themes.Monochrome(), js=js_func) as demo:
1946
  ads = gr.Label('EndlessIdeas: Helping Your Ideas Find A Home', label='Sponsors')
@@ -1984,6 +1988,7 @@ with gr.Blocks(theme=gr.themes.Monochrome(), js=js_func) as demo:
1984
  pass
1985
 
1986
 
 
1987
  with gr.Blocks(theme=gr.themes.Monochrome(), js=js_func, css=css) as demo:
1988
  #ads = gr.Image("C:\\Users\\Wayne\\Downloads\\Welcome Home.gif", show_label=False, scale=5, height=150, show_download_button=False)
1989
  ads = gr.Label("Dream Home: As Quick As A Click. As Simple As Shopping. ", show_label=False)
@@ -1993,7 +1998,11 @@ with gr.Blocks(theme=gr.themes.Monochrome(), js=js_func, css=css) as demo:
1993
  merchant_top = gr.Label(label='Merchant')
1994
  total = gr.Label(label='Number of Items')
1995
  num_of_items = gr.Label(label='Total')
1996
- with gr.Row():
 
 
 
 
1997
  with gr.Column(scale=5) as items_display:
1998
  #room_items = gr.Gallery([((sesh.Palette_img if item == 'Palette' else sesh.default_img ) if item in ['Palette', 'Living Room', 'Bedroom'] else room_item_placeholder_images_dict['LIVING ROOM FURNITURE'][item], item) for item in living_layout_new], label='Room Items', columns=5, height=400, interactive=True)
1999
  room_items = gr.Gallery([((Palette_img if item == 'Palette' else default_img ) if item in ['Palette', 'Living Room', 'Bedroom'] else room_item_placeholder_images_dict['LIVING ROOM FURNITURE'][item], item) for item in living_layout_new], label='Room Items', columns=5, height=400, elem_classes=['scroll'])
@@ -2122,6 +2131,8 @@ with gr.Blocks(theme=gr.themes.Monochrome(), js=js_func, css=css) as demo:
2122
  home_progress_textbox = gr.Textbox(label="Progress Towards Dream Home")
2123
 
2124
 
 
 
2125
  palettes.click(showPalettes, [seshid], [palettes_div, script_div, journeys_div])
2126
  scripts.click(showScripts, [seshid], [palettes_div, script_div, journeys_div, item_links_load])
2127
  journeys.click(showJourneys, [seshid], [palettes_div, script_div, journeys_div])
 
1941
  return 'Script being generated. Try again in 30 seconds.' if not data_dict or 'text' not in data_dict else data_dict['text']
1942
 
1943
 
1944
+ def showMainDisplay(home_address, landing_page, main_display):
1945
+ return gr.update(visible=bool(0)), gr.update(visible=bool(1))
1946
+
1947
+
1948
 
1949
  with gr.Blocks(theme=gr.themes.Monochrome(), js=js_func) as demo:
1950
  ads = gr.Label('EndlessIdeas: Helping Your Ideas Find A Home', label='Sponsors')
 
1988
  pass
1989
 
1990
 
1991
+ #home_address, address_enter, showMainDisplay
1992
  with gr.Blocks(theme=gr.themes.Monochrome(), js=js_func, css=css) as demo:
1993
  #ads = gr.Image("C:\\Users\\Wayne\\Downloads\\Welcome Home.gif", show_label=False, scale=5, height=150, show_download_button=False)
1994
  ads = gr.Label("Dream Home: As Quick As A Click. As Simple As Shopping. ", show_label=False)
 
1998
  merchant_top = gr.Label(label='Merchant')
1999
  total = gr.Label(label='Number of Items')
2000
  num_of_items = gr.Label(label='Total')
2001
+ with gr.Row() as landing_page:
2002
+ merchant_top = gr.Label(label="Let's Get Started")
2003
+ home_address = gr.Textbox()
2004
+ address_enter = gr.Button('Go')
2005
+ with gr.Row(visible=False) as main_display:
2006
  with gr.Column(scale=5) as items_display:
2007
  #room_items = gr.Gallery([((sesh.Palette_img if item == 'Palette' else sesh.default_img ) if item in ['Palette', 'Living Room', 'Bedroom'] else room_item_placeholder_images_dict['LIVING ROOM FURNITURE'][item], item) for item in living_layout_new], label='Room Items', columns=5, height=400, interactive=True)
2008
  room_items = gr.Gallery([((Palette_img if item == 'Palette' else default_img ) if item in ['Palette', 'Living Room', 'Bedroom'] else room_item_placeholder_images_dict['LIVING ROOM FURNITURE'][item], item) for item in living_layout_new], label='Room Items', columns=5, height=400, elem_classes=['scroll'])
 
2131
  home_progress_textbox = gr.Textbox(label="Progress Towards Dream Home")
2132
 
2133
 
2134
+
2135
+ address_enter.click(showMainDisplay, [home_address, landing_page, main_display], [landing_page, main_display])
2136
  palettes.click(showPalettes, [seshid], [palettes_div, script_div, journeys_div])
2137
  scripts.click(showScripts, [seshid], [palettes_div, script_div, journeys_div, item_links_load])
2138
  journeys.click(showJourneys, [seshid], [palettes_div, script_div, journeys_div])