denizaybey commited on
Commit
e459c2b
·
1 Parent(s): 4331e8b

Refactor UI layout: Simplify proportions, update audio input sections, and adjust container width for improved responsiveness and usability.

Browse files
Files changed (1) hide show
  1. app.py +28 -15
app.py CHANGED
@@ -93,7 +93,7 @@ body {
93
  }
94
 
95
  .container {
96
- max-width: 1200px;
97
  margin: 0 auto;
98
  padding: calc(20px * var(--golden-ratio));
99
  background-color: var(--main-bg-color);
@@ -255,7 +255,7 @@ with gr.Blocks(css=css, theme=gr.themes.Soft(primary_hue="indigo", secondary_hue
255
  with gr.Column(elem_classes="container"):
256
  # Logo section
257
  with gr.Row(elem_classes="logo-container"):
258
- logo = gr.Image("logo.png", elem_id="logo")
259
 
260
  # Header section
261
  with gr.Column(elem_classes="header"):
@@ -267,23 +267,36 @@ with gr.Blocks(css=css, theme=gr.themes.Soft(primary_hue="indigo", secondary_hue
267
  </p>
268
  """)
269
 
270
- # Main content with Golden ratio proportions
271
- with gr.Row():
272
- # Input section (larger according to Golden ratio)
273
- with gr.Column(scale=1.618, elem_classes="input-section"):
274
  original_audio = gr.Audio(type="filepath", label="Original .wav file")
 
275
  dubbed_audio = gr.Audio(type="filepath", label="Dubbed .wav file")
 
 
 
 
276
  email = gr.Textbox(label="Email")
 
277
  company_name = gr.Textbox(label="Company Name")
278
- tolerance = gr.Slider(0, 100, value=5, label="Tolerance Percentage",
279
- info="Set the tolerance for audio comparison.")
280
- submit_btn = gr.Button("Process Audio", variant="primary")
281
-
282
- # Output section (smaller according to Golden ratio)
283
- with gr.Column(scale=1, elem_classes="output-section"):
284
- output = gr.Text(label="Processing Status")
285
- gr.Markdown("### Results")
286
- gr.Markdown("Once processing is complete, results will be emailed to the address provided.")
 
 
 
 
 
 
 
287
 
288
  # Footer
289
  with gr.Row(elem_classes="footer"):
 
93
  }
94
 
95
  .container {
96
+ max-width: 100%;
97
  margin: 0 auto;
98
  padding: calc(20px * var(--golden-ratio));
99
  background-color: var(--main-bg-color);
 
255
  with gr.Column(elem_classes="container"):
256
  # Logo section
257
  with gr.Row(elem_classes="logo-container"):
258
+ gr.HTML('<img src="file/logo.png" class="logo" alt="Logo">')
259
 
260
  # Header section
261
  with gr.Column(elem_classes="header"):
 
267
  </p>
268
  """)
269
 
270
+ # Main content with specified layout
271
+ # First Row: Half Original Audio Input, Half Dubbed Audio Input
272
+ with gr.Row(elem_classes="input-section"):
273
+ with gr.Column(scale=1):
274
  original_audio = gr.Audio(type="filepath", label="Original .wav file")
275
+ with gr.Column(scale=1):
276
  dubbed_audio = gr.Audio(type="filepath", label="Dubbed .wav file")
277
+
278
+ # Second Row: 2/3 Email Input 1/3 Company Name Input
279
+ with gr.Row(elem_classes="input-section"):
280
+ with gr.Column(scale=2):
281
  email = gr.Textbox(label="Email")
282
+ with gr.Column(scale=1):
283
  company_name = gr.Textbox(label="Company Name")
284
+
285
+ # Third Row: Tolerance Percentage
286
+ with gr.Row(elem_classes="input-section"):
287
+ tolerance = gr.Slider(0, 100, value=5, label="Tolerance Percentage",
288
+ info="Set the tolerance for audio comparison.")
289
+
290
+ # Fourth Row: Processing Status
291
+ with gr.Row(elem_classes="output-section"):
292
+ output = gr.Text(label="Processing Status")
293
+
294
+ with gr.Row():
295
+ submit_btn = gr.Button("Process Audio", variant="primary")
296
+
297
+ with gr.Row():
298
+ gr.Markdown("### Results")
299
+ gr.Markdown("Once processing is complete, results will be emailed to the address provided.")
300
 
301
  # Footer
302
  with gr.Row(elem_classes="footer"):