harrytarlton commited on
Commit
821dfd3
·
1 Parent(s): a25c910

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +86 -4
app.py CHANGED
@@ -5,18 +5,68 @@ from pathlib import Path
5
 
6
  # Clean, simple CSS
7
  custom_css = """
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  /* Clean modern design */
9
  .gradio-container {
10
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
11
  background: #1a1a2e;
12
  color: #eee;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  }
14
 
15
  /* File panel styling */
16
  .file-panel {
17
  background: #16213e !important;
18
  border-right: 1px solid #0f3460;
19
- height: 100vh;
20
  overflow: hidden;
21
  display: flex;
22
  flex-direction: column;
@@ -70,6 +120,19 @@ custom_css = """
70
  .main-content {
71
  padding: 30px;
72
  background: #1a1a2e;
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  }
74
 
75
  /* Control styling */
@@ -129,6 +192,25 @@ custom_css = """
129
  text-align: center !important;
130
  }
131
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  /* Hide default Gradio label styling */
133
  .gr-form {
134
  background: transparent !important;
@@ -432,7 +514,7 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Base()) as demo:
432
 
433
  with gr.Row():
434
  # Left panel - Input files (1/4 width)
435
- with gr.Column(scale=1, min_width=250):
436
  input_file_panel = gr.HTML(
437
  value=create_input_file_panel_html([]),
438
  elem_classes="file-panel-container"
@@ -442,7 +524,7 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Base()) as demo:
442
  with gr.Column(scale=2, elem_classes="main-content"):
443
 
444
  # Header
445
- gr.Markdown("# 🎸 NAM Garden Audio Processor")
446
 
447
  # Model Selection
448
  with gr.Group(elem_classes="control-group"):
@@ -518,7 +600,7 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Base()) as demo:
518
  )
519
 
520
  # Right panel - Processed files (1/4 width)
521
- with gr.Column(scale=1, min_width=250):
522
  processed_file_panel = gr.HTML(
523
  value=create_processed_file_panel_html([]),
524
  elem_classes="file-panel-container"
 
5
 
6
  # Clean, simple CSS
7
  custom_css = """
8
+ /* Prevent body scrolling */
9
+ body {
10
+ overflow: hidden !important;
11
+ height: 100vh !important;
12
+ margin: 0 !important;
13
+ padding: 0 !important;
14
+ }
15
+
16
+ /* Main app container */
17
+ #component-0,
18
+ .gradio-container > div:first-child {
19
+ height: 100vh !important;
20
+ max-height: 100vh !important;
21
+ overflow: hidden !important;
22
+ }
23
+
24
  /* Clean modern design */
25
  .gradio-container {
26
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
27
  background: #1a1a2e;
28
  color: #eee;
29
+ height: 100vh;
30
+ max-height: 100vh;
31
+ overflow: hidden;
32
+ padding: 0 !important;
33
+ }
34
+
35
+ /* Make columns full height */
36
+ .gradio-container .gr-column {
37
+ height: 100%;
38
+ display: flex;
39
+ flex-direction: column;
40
+ }
41
+
42
+ /* Main row container */
43
+ .gradio-container .gr-row {
44
+ height: 100vh;
45
+ max-height: 100vh;
46
+ overflow: hidden;
47
+ }
48
+
49
+ /* File columns specific styling */
50
+ .file-column {
51
+ height: 100vh !important;
52
+ max-height: 100vh !important;
53
+ overflow: hidden !important;
54
+ display: flex !important;
55
+ flex-direction: column !important;
56
+ }
57
+
58
+ /* File panel container fix */
59
+ .file-panel-container {
60
+ height: 100%;
61
+ max-height: 100%;
62
+ overflow: hidden;
63
  }
64
 
65
  /* File panel styling */
66
  .file-panel {
67
  background: #16213e !important;
68
  border-right: 1px solid #0f3460;
69
+ height: 100%;
70
  overflow: hidden;
71
  display: flex;
72
  flex-direction: column;
 
120
  .main-content {
121
  padding: 30px;
122
  background: #1a1a2e;
123
+ height: 100vh;
124
+ overflow-y: auto;
125
+ overflow-x: hidden;
126
+ }
127
+
128
+ /* Main title styling */
129
+ .main-title {
130
+ text-align: center !important;
131
+ }
132
+
133
+ .main-title h1 {
134
+ text-align: center !important;
135
+ margin: 0 0 20px 0 !important;
136
  }
137
 
138
  /* Control styling */
 
192
  text-align: center !important;
193
  }
194
 
195
+ /* Center slider labels more specifically */
196
+ .gr-slider label,
197
+ .gr-form label span,
198
+ .gr-input-label,
199
+ .gr-block.gr-box label,
200
+ .gr-block label.block,
201
+ div[data-testid="block-label"] {
202
+ text-align: center !important;
203
+ display: block !important;
204
+ width: 100% !important;
205
+ margin: 0 auto !important;
206
+ }
207
+
208
+ /* Additional slider label centering */
209
+ .gr-form .gr-input-label,
210
+ .gr-box .gr-form label {
211
+ justify-content: center !important;
212
+ }
213
+
214
  /* Hide default Gradio label styling */
215
  .gr-form {
216
  background: transparent !important;
 
514
 
515
  with gr.Row():
516
  # Left panel - Input files (1/4 width)
517
+ with gr.Column(scale=1, min_width=250, elem_classes="file-column"):
518
  input_file_panel = gr.HTML(
519
  value=create_input_file_panel_html([]),
520
  elem_classes="file-panel-container"
 
524
  with gr.Column(scale=2, elem_classes="main-content"):
525
 
526
  # Header
527
+ gr.Markdown("# 🎸 NAM Garden Audio Processor", elem_classes="main-title")
528
 
529
  # Model Selection
530
  with gr.Group(elem_classes="control-group"):
 
600
  )
601
 
602
  # Right panel - Processed files (1/4 width)
603
+ with gr.Column(scale=1, min_width=250, elem_classes="file-column"):
604
  processed_file_panel = gr.HTML(
605
  value=create_processed_file_panel_html([]),
606
  elem_classes="file-panel-container"