aliabid94 HF staff commited on
Commit
a0f6f40
โ€ข
1 Parent(s): 8fd442d

Improve layout

Browse files

Scale values should always be full integers. Also removed unnecessary nesting within Columns - scale can be appiled directly to components. Should look better now:
![Screen Shot 2023-08-17 at 1.42.54 PM.png](https://cdn-uploads.huggingface.co/production/uploads/61d7830bb77a8c48d48bc755/oDStxLRSPc_P6zkqsSSJK.png)

Files changed (1) hide show
  1. app_dialogue.py +6 -10
app_dialogue.py CHANGED
@@ -314,6 +314,7 @@ textbox = gr.Textbox(
314
  visible=True,
315
  container=False,
316
  label="Text input",
 
317
  )
318
  with gr.Blocks(title="IDEFICS Playground", theme=gr.themes.Base()) as demo:
319
  gr.HTML("""<h1 align="center">๐Ÿถ IDEFICS Playground - EMBARGO UNTIL AUGUST 22ND</h1>""") # TODO remove embargo
@@ -383,16 +384,11 @@ with gr.Blocks(title="IDEFICS Playground", theme=gr.themes.Base()) as demo:
383
 
384
  with gr.Group():
385
  with gr.Row():
386
- with gr.Column(scale=0.6):
387
- textbox.render()
388
- with gr.Column(scale=0.1, min_width=80):
389
- submit_btn = gr.Button(value="โ–ถ๏ธ Submit", visible=True)
390
- with gr.Column(scale=0.1, min_width=0):
391
- clear_btn = gr.ClearButton([textbox, imagebox, chatbot], value="๐Ÿงน Clear")
392
- with gr.Column(scale=0.1, min_width=0):
393
- regenerate_btn = gr.Button(value="๐Ÿ”„ Regenerate", visible=True)
394
- with gr.Column(scale=0.1, min_width=0):
395
- upload_btn = gr.UploadButton("๐Ÿ“ Upload image", file_types=["image"])
396
  # with gr.Group():
397
  # with gr.Row():
398
  # with gr.Column(scale=1, min_width=50):
 
314
  visible=True,
315
  container=False,
316
  label="Text input",
317
+ scale=6
318
  )
319
  with gr.Blocks(title="IDEFICS Playground", theme=gr.themes.Base()) as demo:
320
  gr.HTML("""<h1 align="center">๐Ÿถ IDEFICS Playground - EMBARGO UNTIL AUGUST 22ND</h1>""") # TODO remove embargo
 
384
 
385
  with gr.Group():
386
  with gr.Row():
387
+ textbox.render()
388
+ submit_btn = gr.Button(value="โ–ถ๏ธ Submit", visible=True)
389
+ clear_btn = gr.ClearButton([textbox, imagebox, chatbot], value="๐Ÿงน Clear")
390
+ regenerate_btn = gr.Button(value="๐Ÿ”„ Regenerate", visible=True)
391
+ upload_btn = gr.UploadButton("๐Ÿ“ Upload image", file_types=["image"])
 
 
 
 
 
392
  # with gr.Group():
393
  # with gr.Row():
394
  # with gr.Column(scale=1, min_width=50):