zach commited on
Commit
c686efd
·
1 Parent(s): 706bed4

Move custom css to global styles file

Browse files
Files changed (2) hide show
  1. src/app.py +4 -19
  2. src/assets/styles.css +11 -0
src/app.py CHANGED
@@ -398,31 +398,18 @@ class App:
398
  Returns:
399
  gr.Blocks: The fully constructed Gradio UI layout.
400
  """
401
- custom_css = """
402
- #vote-result-a textarea,
403
- #vote-result-b textarea {
404
- font-size: 16px !important;
405
- font-weight: bold !important;
406
- }
407
-
408
- #vote-result-a.winner textarea,
409
- #vote-result-b.winner textarea {
410
- background: #EA580C;
411
- }
412
- """
413
-
414
  with gr.Blocks(
415
  title="Expressive TTS Arena",
416
  fill_width=True,
417
  css_paths="src/assets/styles.css",
418
- css=custom_css,
419
  ) as demo:
420
  # --- UI components ---
421
- gr.Markdown("# Expressive TTS Arena")
422
-
423
  gr.HTML(
424
  """
425
- <p><strong>Instructions</strong></p>
 
 
426
  <ol style="margin-left: 8px;">
427
  <li>
428
  Choose or enter a character description by selecting a sample or typing your own to guide
@@ -446,13 +433,11 @@ class App:
446
  </ol>
447
  """
448
  )
449
-
450
  (
451
  sample_character_description_dropdown,
452
  character_description_input,
453
  generate_text_button,
454
  ) = self._build_input_section()
455
-
456
  (
457
  text_input,
458
  synthesize_speech_button,
 
398
  Returns:
399
  gr.Blocks: The fully constructed Gradio UI layout.
400
  """
 
 
 
 
 
 
 
 
 
 
 
 
 
401
  with gr.Blocks(
402
  title="Expressive TTS Arena",
403
  fill_width=True,
404
  css_paths="src/assets/styles.css",
 
405
  ) as demo:
406
  # --- UI components ---
407
+ gr.HTML("<h1>Expressive TTS Arena</h1>")
 
408
  gr.HTML(
409
  """
410
+ <p style="font-size: 16px; font-weight: bold;">
411
+ <strong>Instructions</strong>
412
+ </p>
413
  <ol style="margin-left: 8px;">
414
  <li>
415
  Choose or enter a character description by selecting a sample or typing your own to guide
 
433
  </ol>
434
  """
435
  )
 
436
  (
437
  sample_character_description_dropdown,
438
  character_description_input,
439
  generate_text_button,
440
  ) = self._build_input_section()
 
441
  (
442
  text_input,
443
  synthesize_speech_button,
src/assets/styles.css CHANGED
@@ -2,3 +2,14 @@
2
  footer.svelte-sar7eh {
3
  display: none !important;
4
  }
 
 
 
 
 
 
 
 
 
 
 
 
2
  footer.svelte-sar7eh {
3
  display: none !important;
4
  }
5
+
6
+ #vote-result-a textarea,
7
+ #vote-result-b textarea {
8
+ font-size: 16px !important;
9
+ font-weight: bold !important;
10
+ }
11
+
12
+ #vote-result-a.winner textarea,
13
+ #vote-result-b.winner textarea {
14
+ background: #EA580C;
15
+ }