multimodalart HF staff commited on
Commit
948baad
1 Parent(s): b1d7968

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +38 -30
app.py CHANGED
@@ -503,14 +503,16 @@ with gr.Blocks(css="style.css") as demo:
503
  # 1st SEGA concept
504
  with gr.Row().style(mobile_collapse=False) as row1:
505
  with gr.Column(scale=3, min_width=100):
506
- edit_concept_1 = gr.Textbox(
507
- label="Concept",
508
- show_label=True,
509
- max_lines=1, value="",
510
- placeholder="E.g.: Sunglasses",
511
- )
512
- with gr.Column(scale=2, min_width=100):
513
- dropdown1 = gr.Dropdown(label = "Edit Type", value ='custom' , choices=['custom','style', 'object', 'faces'])
 
 
514
 
515
 
516
  with gr.Column(scale=1, min_width=100, visible=False):
@@ -525,37 +527,43 @@ with gr.Blocks(css="style.css") as demo:
525
  # 2nd SEGA concept
526
  with gr.Row(visible=False).style(equal_height=True) as row2:
527
  with gr.Column(scale=3, min_width=100):
528
- edit_concept_2 = gr.Textbox(
529
- label="Concept",
530
- show_label=True,
531
- max_lines=1,
532
- placeholder="E.g.: Realistic",
533
- )
 
 
 
 
 
534
  with gr.Column(scale=1, min_width=100, visible=False):
535
  neg_guidance_2 = gr.Checkbox(
536
  label='Remove Concept?')
537
- with gr.Column(scale=2, min_width=100):
538
- dropdown2 = gr.Dropdown(label = "Edit Type", value ='custom' , choices=['custom','style', 'object', 'faces'])
539
-
540
  with gr.Column(scale=1, min_width=100):
541
  add_2 = gr.Button('Add')
542
  remove_2 = gr.Button('Remove')
543
 
544
  # 3rd SEGA concept
545
  with gr.Row(visible=False).style(equal_height=True) as row3:
546
- with gr.Column(scale=3, min_width=100):
547
- edit_concept_3 = gr.Textbox(
548
- label="Concept",
549
- show_label=True,
550
- max_lines=1,
551
- placeholder="E.g.: orange",
552
- )
553
- with gr.Column(scale=1, min_width=100, visible=False):
554
- neg_guidance_3 = gr.Checkbox(
555
- label='Remove Concept?',visible=True)
556
- with gr.Column(scale=2, min_width=100):
557
- dropdown3 = gr.Dropdown(label = "Edit Type", value ='custom' , choices=['custom','style', 'object', 'faces'])
558
- with gr.Column(scale=1, min_width=100):
 
 
 
559
  add_3 = gr.Button('Add')
560
  remove_3 = gr.Button('Remove')
561
 
 
503
  # 1st SEGA concept
504
  with gr.Row().style(mobile_collapse=False) as row1:
505
  with gr.Column(scale=3, min_width=100):
506
+ with gr.Row().style(mobile_collapse=True):
507
+ with gr.Column(scale=3, min_width=100):
508
+ edit_concept_1 = gr.Textbox(
509
+ label="Concept",
510
+ show_label=True,
511
+ max_lines=1, value="",
512
+ placeholder="E.g.: Sunglasses",
513
+ )
514
+ with gr.Column(scale=2, min_width=100):
515
+ dropdown1 = gr.Dropdown(label = "Edit Type", value ='custom' , choices=['custom','style', 'object', 'faces'])
516
 
517
 
518
  with gr.Column(scale=1, min_width=100, visible=False):
 
527
  # 2nd SEGA concept
528
  with gr.Row(visible=False).style(equal_height=True) as row2:
529
  with gr.Column(scale=3, min_width=100):
530
+ with gr.Row().style(mobile_collapse=True): #better mobile UI
531
+ with gr.Column(scale=3, min_width=100):
532
+ edit_concept_2 = gr.Textbox(
533
+ label="Concept",
534
+ show_label=True,
535
+ max_lines=1,
536
+ placeholder="E.g.: Realistic",
537
+ )
538
+ with gr.Column(scale=2, min_width=100):
539
+ dropdown2 = gr.Dropdown(label = "Edit Type", value ='custom' , choices=['custom','style', 'object', 'faces'])
540
+
541
  with gr.Column(scale=1, min_width=100, visible=False):
542
  neg_guidance_2 = gr.Checkbox(
543
  label='Remove Concept?')
544
+
 
 
545
  with gr.Column(scale=1, min_width=100):
546
  add_2 = gr.Button('Add')
547
  remove_2 = gr.Button('Remove')
548
 
549
  # 3rd SEGA concept
550
  with gr.Row(visible=False).style(equal_height=True) as row3:
551
+ with gr.Column(scale=3, min_width=100):
552
+ with gr.Row().style(mobile_collapse=True): #better mobile UI
553
+ with gr.Column(scale=3, min_width=100):
554
+ edit_concept_3 = gr.Textbox(
555
+ label="Concept",
556
+ show_label=True,
557
+ max_lines=1,
558
+ placeholder="E.g.: orange",
559
+ )
560
+ with gr.Column(scale=2, min_width=100):
561
+ dropdown3 = gr.Dropdown(label = "Edit Type", value ='custom' , choices=['custom','style', 'object', 'faces'])
562
+
563
+ with gr.Column(scale=1, min_width=100, visible=False):
564
+ neg_guidance_3 = gr.Checkbox(
565
+ label='Remove Concept?',visible=True)
566
+ with gr.Column(scale=1, min_width=100):
567
  add_3 = gr.Button('Add')
568
  remove_3 = gr.Button('Remove')
569