JJteam commited on
Commit
795591e
1 Parent(s): f3d9e6b

correcting width for huggingface space website

Browse files
Files changed (1) hide show
  1. MM-REACT/app.py +14 -14
MM-REACT/app.py CHANGED
@@ -407,7 +407,8 @@ def init_and_kick_off():
407
 
408
  reset_btn = gr.Button(value="!!!CLICK to wake up MM-REACT!!!", variant="primary", elem_id="resetbtn").style(full_width=True)
409
 
410
- example_image_size = 110
 
411
  button_variant = "primary"
412
  with gr.Row():
413
  with gr.Column(scale=1.0, min_width=100):
@@ -416,43 +417,42 @@ def init_and_kick_off():
416
  with gr.Row():
417
  grExampleTitle = gr.HTML(exampleTitle, visible=False)
418
  with gr.Row():
419
- with gr.Column(scale=0.50, min_width=100):
420
  example3Image = gr.Image("images/receipt.png", interactive=False).style(height=example_image_size, width=example_image_size)
421
- with gr.Column(scale=0.50, min_width=100):
422
  example3ImageButton = gr.Button(elem_id="tryButton", value="Try it!", variant=button_variant).style(full_width=True)
423
  # dummy text field to hold the path
424
  example3ImagePath = gr.Text("images/receipt.png", interactive=False, visible=False)
425
  with gr.Row():
426
- with gr.Column(scale=0.50, min_width=100):
427
  example1Image = gr.Image("images/money.png", interactive=False).style(height=example_image_size, width=example_image_size)
428
- with gr.Column(scale=0.50, min_width=100):
429
  example1ImageButton = gr.Button(elem_id="tryButton", value="Try it!", variant=button_variant).style(full_width=True)
430
  # dummy text field to hold the path
431
  example1ImagePath = gr.Text("images/money.png", interactive=False, visible=False)
432
  with gr.Row():
433
- with gr.Column(scale=0.50, min_width=100):
434
  example2Image = gr.Image("images/bar_plot.png", interactive=False).style(height=example_image_size, width=example_image_size)
435
- with gr.Column(scale=0.50, min_width=100):
436
  example2ImageButton = gr.Button(elem_id="tryButton", value="Try it!", variant=button_variant).style(full_width=True)
437
  # dummy text field to hold the path
438
  example2ImagePath = gr.Text("images/bar_plot.png", interactive=False, visible=False)
439
  with gr.Row():
440
- with gr.Column(scale=0.50, min_width=100):
441
- example4Image = gr.Image("images/sign.png", interactive=False).style(height=100, width=100)
442
- with gr.Column(scale=0.50, min_width=100):
443
  example4ImageButton = gr.Button(elem_id="tryButton", value="Try it!", variant=button_variant).style(full_width=True)
444
  # dummy text field to hold the path
445
  example4ImagePath = gr.Text("images/sign.png", interactive=False, visible=False)
446
  with gr.Row():
447
- with gr.Column(scale=0.50, min_width=100):
448
  example5Image = gr.Image("images/face.jpg", interactive=False).style(height=example_image_size, width=example_image_size)
449
- with gr.Column(scale=0.50, min_width=100):
450
  example5ImageButton = gr.Button(elem_id="tryButton", value="Try it!", variant=button_variant).style(full_width=True)
451
  # dummy text field to hold the path
452
  example5ImagePath = gr.Text("images/face.jpg", interactive=False, visible=False)
453
 
454
 
455
-
456
  with gr.Row():
457
  with gr.Column(scale=0.75):
458
  message = gr.Textbox(label="Upload a pic and ask!",
@@ -495,4 +495,4 @@ if __name__ == '__main__':
495
  ARGS = parser.parse_args()
496
 
497
  init_and_kick_off()
498
-
 
407
 
408
  reset_btn = gr.Button(value="!!!CLICK to wake up MM-REACT!!!", variant="primary", elem_id="resetbtn").style(full_width=True)
409
 
410
+ example_image_size = 90
411
+ col_min_width = 80
412
  button_variant = "primary"
413
  with gr.Row():
414
  with gr.Column(scale=1.0, min_width=100):
 
417
  with gr.Row():
418
  grExampleTitle = gr.HTML(exampleTitle, visible=False)
419
  with gr.Row():
420
+ with gr.Column(scale=0.50, min_width=col_min_width):
421
  example3Image = gr.Image("images/receipt.png", interactive=False).style(height=example_image_size, width=example_image_size)
422
+ with gr.Column(scale=0.50, min_width=col_min_width):
423
  example3ImageButton = gr.Button(elem_id="tryButton", value="Try it!", variant=button_variant).style(full_width=True)
424
  # dummy text field to hold the path
425
  example3ImagePath = gr.Text("images/receipt.png", interactive=False, visible=False)
426
  with gr.Row():
427
+ with gr.Column(scale=0.50, min_width=col_min_width):
428
  example1Image = gr.Image("images/money.png", interactive=False).style(height=example_image_size, width=example_image_size)
429
+ with gr.Column(scale=0.50, min_width=col_min_width):
430
  example1ImageButton = gr.Button(elem_id="tryButton", value="Try it!", variant=button_variant).style(full_width=True)
431
  # dummy text field to hold the path
432
  example1ImagePath = gr.Text("images/money.png", interactive=False, visible=False)
433
  with gr.Row():
434
+ with gr.Column(scale=0.50, min_width=col_min_width):
435
  example2Image = gr.Image("images/bar_plot.png", interactive=False).style(height=example_image_size, width=example_image_size)
436
+ with gr.Column(scale=0.50, min_width=col_min_width):
437
  example2ImageButton = gr.Button(elem_id="tryButton", value="Try it!", variant=button_variant).style(full_width=True)
438
  # dummy text field to hold the path
439
  example2ImagePath = gr.Text("images/bar_plot.png", interactive=False, visible=False)
440
  with gr.Row():
441
+ with gr.Column(scale=0.50, min_width=col_min_width):
442
+ example4Image = gr.Image("images/sign.png", interactive=False).style(height=example_image_size, width=example_image_size)
443
+ with gr.Column(scale=0.50, min_width=col_min_width):
444
  example4ImageButton = gr.Button(elem_id="tryButton", value="Try it!", variant=button_variant).style(full_width=True)
445
  # dummy text field to hold the path
446
  example4ImagePath = gr.Text("images/sign.png", interactive=False, visible=False)
447
  with gr.Row():
448
+ with gr.Column(scale=0.50, min_width=col_min_width):
449
  example5Image = gr.Image("images/face.jpg", interactive=False).style(height=example_image_size, width=example_image_size)
450
+ with gr.Column(scale=0.50, min_width=col_min_width):
451
  example5ImageButton = gr.Button(elem_id="tryButton", value="Try it!", variant=button_variant).style(full_width=True)
452
  # dummy text field to hold the path
453
  example5ImagePath = gr.Text("images/face.jpg", interactive=False, visible=False)
454
 
455
 
 
456
  with gr.Row():
457
  with gr.Column(scale=0.75):
458
  message = gr.Textbox(label="Upload a pic and ask!",
 
495
  ARGS = parser.parse_args()
496
 
497
  init_and_kick_off()
498
+