Commit
·
a06400e
1
Parent(s):
32b3359
Refactor UI layout to include tabbed sections for better organization and clarity
Browse files
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 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
|
| 282 |
-
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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(
|