denizaybey commited on
Commit
a06400e
·
1 Parent(s): 32b3359

Refactor UI layout to include tabbed sections for better organization and clarity

Browse files
Files changed (1) hide show
  1. app.py +37 -33
app.py CHANGED
@@ -253,39 +253,43 @@ with gr.Blocks(css=css, theme=gr.themes.Soft(primary_hue="indigo", secondary_hue
253
  """)
254
 
255
  # Main content with specified layout
256
- # First Row: Half Original Audio Input, Half Dubbed Audio Input
257
- with gr.Row(elem_classes="input-section"):
258
- with gr.Column(scale=1):
259
- original_audio = gr.Audio(type="filepath", label="Original .wav file", sources=['upload'],format="wav")
260
- with gr.Column(scale=1):
261
- dubbed_audio = gr.Audio(type="filepath", label="Dubbed .wav file", sources=['upload'],format="wav")
262
-
263
- # Second Row: 2/3 Email Input 1/3 Company Name Input
264
- with gr.Row(elem_classes="input-section"):
265
- with gr.Column(scale=2):
266
- _email = gr.Textbox(label="Email")
267
- with gr.Column(scale=1):
268
- _company_name = gr.Textbox(label="Company Name")
269
-
270
- # Third Row: Tolerance Percentage
271
- with gr.Row(elem_classes="input-section"):
272
- _tolerance = gr.Slider(0, 100, value=5, label="Tolerance Percentage",
273
- info="Set the tolerance for audio comparison.")
274
-
275
- # Fourth Row: Processing Status
276
- with gr.Row(elem_classes="output-section"):
277
- output = gr.Text(label="Processing Status")
278
-
279
- with gr.Row():
280
- submit_btn = gr.Button("Process Audio", variant="primary")
281
-
282
- with gr.Row():
283
- gr.Markdown("### Results")
284
- gr.Markdown("Once processing is complete, results will be emailed to the address provided.")
285
-
286
- # Footer
287
- with gr.Row(elem_classes="footer"):
288
- gr.Markdown("© BSOD.tv - Professional Dub Quality Control")
 
 
 
 
289
 
290
  # Set up the processing function
291
  submit_btn.click(
 
253
  """)
254
 
255
  # Main content with specified layout
256
+ with gr.Tabs():
257
+ with gr.Tab("Dub Quality Control"):
258
+ # First Row: Half Original Audio Input, Half Dubbed Audio Input
259
+ with gr.Row(elem_classes="input-section"):
260
+ with gr.Column(scale=1):
261
+ original_audio = gr.Audio(type="filepath", label="Original .wav file", sources=['upload'],format="wav")
262
+ with gr.Column(scale=1):
263
+ dubbed_audio = gr.Audio(type="filepath", label="Dubbed .wav file", sources=['upload'],format="wav")
264
+
265
+ # Second Row: 2/3 Email Input 1/3 Company Name Input
266
+ with gr.Row(elem_classes="input-section"):
267
+ with gr.Column(scale=2):
268
+ _email = gr.Textbox(label="Email")
269
+ with gr.Column(scale=1):
270
+ _company_name = gr.Textbox(label="Company Name")
271
+
272
+ # Third Row: Tolerance Percentage
273
+ with gr.Row(elem_classes="input-section"):
274
+ _tolerance = gr.Slider(0, 100, value=5, label="Tolerance Percentage",
275
+ info="Set the tolerance for audio comparison.")
276
+
277
+ # Fourth Row: Processing Status
278
+ with gr.Row(elem_classes="output-section"):
279
+ output = gr.Text(label="Processing Status")
280
+
281
+ with gr.Row():
282
+ submit_btn = gr.Button("Process Audio", variant="primary")
283
+
284
+ with gr.Row():
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"):
290
+ gr.Markdown("© BSOD.tv - Professional Dub Quality Control")
291
+ with gr.Tab("Content Moderation"):
292
+ pass
293
 
294
  # Set up the processing function
295
  submit_btn.click(