MohamedRashad commited on
Commit
a26f4fc
ยท
1 Parent(s): d295281

Refactor header formatting in app.py to use HTML for title and update instructions section

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -57,9 +57,7 @@ def infer_EGTTS(text: str, speaker_audio_path: str, temperature: float = 0.75):
57
 
58
  return 24000, out["wav"]
59
 
60
- header = """<center><h1>Egyptian-Arabic-TTS (EGTTS)</h1></center>
61
-
62
- ## Instructions:
63
 
64
  1. Enter the text you want to synthesize.
65
  2. Upload a 4-5 seconds audio file of the speaker you want to clone.
@@ -68,7 +66,8 @@ header = """<center><h1>Egyptian-Arabic-TTS (EGTTS)</h1></center>
68
  **This space was only possible because of the amazing work done by [OmarSamir](https://huggingface.co/OmarSamir) on the [EGTTS](https://huggingface.co/OmarSamir/EGTTS-V0.1) model.**
69
  """
70
  with gr.Blocks(title="EGTTS") as app:
71
- gr.Markdown(header)
 
72
  with gr.Row():
73
  with gr.Column():
74
  text = gr.Textbox(label="Text to synthesize", value="ุงู„ุณู„ุงู… ุนู„ูŠูƒู… ูˆุฑุญู…ุฉ ุงู„ู„ู‡")
 
57
 
58
  return 24000, out["wav"]
59
 
60
+ markdown_description = """## Instructions:
 
 
61
 
62
  1. Enter the text you want to synthesize.
63
  2. Upload a 4-5 seconds audio file of the speaker you want to clone.
 
66
  **This space was only possible because of the amazing work done by [OmarSamir](https://huggingface.co/OmarSamir) on the [EGTTS](https://huggingface.co/OmarSamir/EGTTS-V0.1) model.**
67
  """
68
  with gr.Blocks(title="EGTTS") as app:
69
+ gr.HTML("<center><h1>Egyptian-Arabic-TTS (EGTTS)</h1></center>")
70
+ gr.Markdown(markdown_description)
71
  with gr.Row():
72
  with gr.Column():
73
  text = gr.Textbox(label="Text to synthesize", value="ุงู„ุณู„ุงู… ุนู„ูŠูƒู… ูˆุฑุญู…ุฉ ุงู„ู„ู‡")