dreibh commited on
Commit
3253581
·
verified ·
1 Parent(s): 6605bc9

Yet another try.

Browse files
Files changed (1) hide show
  1. app.py +17 -14
app.py CHANGED
@@ -372,7 +372,8 @@ if len(args) > 0:
372
 
373
 
374
  # ====== Create GUI =========================================================
375
- with gradio.Blocks(css = css, theme = gradio.themes.Glass(secondary_hue=gradio.themes.colors.blue), fill_height = False, fill_width = True) as gui:
 
376
 
377
  # ====== Session handling ================================================
378
  # Session initialization, to be called when page is loaded
@@ -381,7 +382,7 @@ with gradio.Blocks(css = css, theme = gradio.themes.Glass(secondary_hue=gradio.t
381
  gui.unload(cleanUpSession)
382
 
383
  # ====== Header ==========================================================
384
- with gradio.Row(scale = 0):
385
  big_block = gradio.HTML("""
386
  <div class="program-header">
387
  <div class="program-logo-left">
@@ -395,7 +396,7 @@ with gradio.Blocks(css = css, theme = gradio.themes.Glass(secondary_hue=gradio.t
395
  """)
396
 
397
  gradio.Markdown('## Settings')
398
- with gradio.Row():
399
  sliderNumberOfECGs = gradio.Slider(1, 100, label="Number of ECGs", step = 1, value = 4, interactive = True)
400
  # sliderLengthInSeconds = gradio.Slider(5, 60, label="Length (s)", step = 5, value = 10, interactive = True)
401
  dropdownType = gradio.Dropdown( [ 'ECG-12', 'ECG-8' ], label = 'ECG Type', interactive = True)
@@ -415,17 +416,19 @@ with gradio.Blocks(css = css, theme = gradio.themes.Glass(secondary_hue=gradio.t
415
 
416
  # with gradio.Row():
417
 
418
- analysisOutput = gradio.Plot()
419
-
420
- outputGallery = gradio.Gallery(label = 'output',
421
- columns = 4,
422
- rows = 1,
423
- height = '5hv',
424
- object_fit = 'contain',
425
- show_label = True,
426
- allow_preview = True,
427
- preview = False
428
- )
 
 
429
  outputGallery.select(select)
430
 
431
 
 
372
 
373
 
374
  # ====== Create GUI =========================================================
375
+ with gradio.Blocks(css = css, theme = gradio.themes.Glass(secondary_hue=gradio.themes.colors.blue),
376
+ fill_height = False, fill_width = True) as gui:
377
 
378
  # ====== Session handling ================================================
379
  # Session initialization, to be called when page is loaded
 
382
  gui.unload(cleanUpSession)
383
 
384
  # ====== Header ==========================================================
385
+ with gradio.Row(height = '10vh', min_height = '10vh', max_height = '10vh'):
386
  big_block = gradio.HTML("""
387
  <div class="program-header">
388
  <div class="program-logo-left">
 
396
  """)
397
 
398
  gradio.Markdown('## Settings')
399
+ with gradio.Row(height = '10vh', min_height = '10vh', max_height = '10vh'):
400
  sliderNumberOfECGs = gradio.Slider(1, 100, label="Number of ECGs", step = 1, value = 4, interactive = True)
401
  # sliderLengthInSeconds = gradio.Slider(5, 60, label="Length (s)", step = 5, value = 10, interactive = True)
402
  dropdownType = gradio.Dropdown( [ 'ECG-12', 'ECG-8' ], label = 'ECG Type', interactive = True)
 
416
 
417
  # with gradio.Row():
418
 
419
+ with gradio.Row(height = '32vh', min_height = '32vh', max_height = '32vh'):
420
+ analysisOutput = gradio.Plot()
421
+
422
+ with gradio.Row(height = '24vh', min_height = '24vh', max_height = '24vh'):
423
+ outputGallery = gradio.Gallery(label = 'output',
424
+ columns = 8,
425
+ rows = 1,
426
+ height = 'auto',
427
+ object_fit = 'contain',
428
+ show_label = True,
429
+ allow_preview = True,
430
+ preview = False
431
+ )
432
  outputGallery.select(select)
433
 
434