Linoy Tsaban commited on
Commit
efbd019
1 Parent(s): 5d8e6b4

Update app.py

Browse files

mobile UI improvements

Files changed (1) hide show
  1. app.py +23 -16
app.py CHANGED
@@ -508,15 +508,15 @@ with gr.Blocks(css="style.css") as demo:
508
  with gr.Row().style(mobile_collapse=False) as row1:
509
  with gr.Column(scale=3, min_width=100):
510
  with gr.Row().style(mobile_collapse=True):
511
- with gr.Column(scale=3, min_width=100):
512
- edit_concept_1 = gr.Textbox(
513
  label="Concept",
514
  show_label=True,
515
  max_lines=1, value="",
516
  placeholder="E.g.: Sunglasses",
517
  )
518
- with gr.Column(scale=2, min_width=100):
519
- dropdown1 = gr.Dropdown(label = "Edit Type", value ='custom' , choices=['custom','style', 'object', 'faces'])
520
 
521
 
522
  with gr.Column(scale=1, min_width=100, visible=False):
@@ -524,29 +524,33 @@ with gr.Blocks(css="style.css") as demo:
524
  label='Remove Concept?')
525
 
526
  with gr.Column(scale=1, min_width=100):
527
- add_1 = gr.Button('Add')
528
- remove_1 = gr.Button('Remove')
 
 
529
 
530
 
531
  # 2nd SEGA concept
532
  with gr.Row(visible=False).style(equal_height=True) as row2:
533
  with gr.Column(scale=3, min_width=100):
534
  with gr.Row().style(mobile_collapse=True): #better mobile UI
535
- with gr.Column(scale=3, min_width=100):
536
- edit_concept_2 = gr.Textbox(
537
  label="Concept",
538
  show_label=True,
539
  max_lines=1,
540
  placeholder="E.g.: Realistic",
541
  )
542
- with gr.Column(scale=2, min_width=100):
543
- dropdown2 = gr.Dropdown(label = "Edit Type", value ='custom' , choices=['custom','style', 'object', 'faces'])
544
 
545
  with gr.Column(scale=1, min_width=100, visible=False):
546
  neg_guidance_2 = gr.Checkbox(
547
  label='Remove Concept?')
548
 
549
  with gr.Column(scale=1, min_width=100):
 
 
550
  add_2 = gr.Button('Add')
551
  remove_2 = gr.Button('Remove')
552
 
@@ -554,22 +558,25 @@ with gr.Blocks(css="style.css") as demo:
554
  with gr.Row(visible=False).style(equal_height=True) as row3:
555
  with gr.Column(scale=3, min_width=100):
556
  with gr.Row().style(mobile_collapse=True): #better mobile UI
557
- with gr.Column(scale=3, min_width=100):
558
- edit_concept_3 = gr.Textbox(
559
  label="Concept",
560
  show_label=True,
561
  max_lines=1,
562
  placeholder="E.g.: orange",
563
  )
564
- with gr.Column(scale=2, min_width=100):
565
- dropdown3 = gr.Dropdown(label = "Edit Type", value ='custom' , choices=['custom','style', 'object', 'faces'])
566
 
567
  with gr.Column(scale=1, min_width=100, visible=False):
568
  neg_guidance_3 = gr.Checkbox(
569
  label='Remove Concept?',visible=True)
 
570
  with gr.Column(scale=1, min_width=100):
571
- add_3 = gr.Button('Add')
572
- remove_3 = gr.Button('Remove')
 
 
573
 
574
  with gr.Row(visible=False).style(equal_height=True) as row4:
575
  gr.Markdown("### Max of 3 concepts reached. Remove a concept to add more")
 
508
  with gr.Row().style(mobile_collapse=False) as row1:
509
  with gr.Column(scale=3, min_width=100):
510
  with gr.Row().style(mobile_collapse=True):
511
+ # with gr.Column(scale=3, min_width=100):
512
+ edit_concept_1 = gr.Textbox(
513
  label="Concept",
514
  show_label=True,
515
  max_lines=1, value="",
516
  placeholder="E.g.: Sunglasses",
517
  )
518
+ # with gr.Column(scale=2, min_width=100):# better mobile ui
519
+ dropdown1 = gr.Dropdown(label = "Edit Type", value ='custom' , choices=['custom','style', 'object', 'faces'])
520
 
521
 
522
  with gr.Column(scale=1, min_width=100, visible=False):
 
524
  label='Remove Concept?')
525
 
526
  with gr.Column(scale=1, min_width=100):
527
+ with gr.Row().style(mobile_collapse=False): # better mobile ui
528
+ with gr.Column():
529
+ add_1 = gr.Button('Add')
530
+ remove_1 = gr.Button('Remove')
531
 
532
 
533
  # 2nd SEGA concept
534
  with gr.Row(visible=False).style(equal_height=True) as row2:
535
  with gr.Column(scale=3, min_width=100):
536
  with gr.Row().style(mobile_collapse=True): #better mobile UI
537
+ # with gr.Column(scale=3, min_width=100):
538
+ edit_concept_2 = gr.Textbox(
539
  label="Concept",
540
  show_label=True,
541
  max_lines=1,
542
  placeholder="E.g.: Realistic",
543
  )
544
+ # with gr.Column(scale=2, min_width=100):# better mobile ui
545
+ dropdown2 = gr.Dropdown(label = "Edit Type", value ='custom' , choices=['custom','style', 'object', 'faces'])
546
 
547
  with gr.Column(scale=1, min_width=100, visible=False):
548
  neg_guidance_2 = gr.Checkbox(
549
  label='Remove Concept?')
550
 
551
  with gr.Column(scale=1, min_width=100):
552
+ with gr.Row().style(mobile_collapse=False): # better mobile ui
553
+ with gr.Column():
554
  add_2 = gr.Button('Add')
555
  remove_2 = gr.Button('Remove')
556
 
 
558
  with gr.Row(visible=False).style(equal_height=True) as row3:
559
  with gr.Column(scale=3, min_width=100):
560
  with gr.Row().style(mobile_collapse=True): #better mobile UI
561
+ # with gr.Column(scale=3, min_width=100):
562
+ edit_concept_3 = gr.Textbox(
563
  label="Concept",
564
  show_label=True,
565
  max_lines=1,
566
  placeholder="E.g.: orange",
567
  )
568
+ # with gr.Column(scale=2, min_width=100):
569
+ dropdown3 = gr.Dropdown(label = "Edit Type", value ='custom' , choices=['custom','style', 'object', 'faces'])
570
 
571
  with gr.Column(scale=1, min_width=100, visible=False):
572
  neg_guidance_3 = gr.Checkbox(
573
  label='Remove Concept?',visible=True)
574
+
575
  with gr.Column(scale=1, min_width=100):
576
+ with gr.Row().style(mobile_collapse=False): # better mobile ui
577
+ with gr.Column():
578
+ add_3 = gr.Button('Add')
579
+ remove_3 = gr.Button('Remove')
580
 
581
  with gr.Row(visible=False).style(equal_height=True) as row4:
582
  gr.Markdown("### Max of 3 concepts reached. Remove a concept to add more")