Steveeeeeeen HF staff commited on
Commit
97132bd
·
verified ·
1 Parent(s): cce1550

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -2
app.py CHANGED
@@ -9,6 +9,10 @@ from zonos.conditioning import make_cond_dict, supported_language_codes
9
  MODELS_CACHE = {}
10
  device = "cuda"
11
 
 
 
 
 
12
  def load_model(model_name: str):
13
  """
14
  Loads or retrieves a cached Zonos model, sets it to eval and bfloat16.
@@ -74,9 +78,18 @@ def tts(text, speaker_audio, selected_language, model_choice):
74
  return (sr_out, wav_out.numpy())
75
 
76
  def build_demo():
77
- with gr.Blocks() as demo:
78
- gr.Markdown("# Simple Zonos TTS Demo")
 
 
 
 
79
 
 
 
 
 
 
80
  with gr.Row():
81
  text_input = gr.Textbox(
82
  label="Text Prompt",
 
9
  MODELS_CACHE = {}
10
  device = "cuda"
11
 
12
+ banner_url = "https://huggingface.co/datasets/Steveeeeeeen/random_images/resolve/main/ZonosHeader.png"
13
+ BANNER = f'<div style="display: flex; justify-content: space-around;"><img src="{banner_url}" alt="Banner" style="width: 40vw; min-width: 150px; max-width: 300px;"> </div>'
14
+
15
+
16
  def load_model(model_name: str):
17
  """
18
  Loads or retrieves a cached Zonos model, sets it to eval and bfloat16.
 
78
  return (sr_out, wav_out.numpy())
79
 
80
  def build_demo():
81
+ with gr.Blocks(theme='davehornik/Tealy') as demo:
82
+ gr.HTML(BANNER, elem_id="banner")
83
+ gr.Markdown("## Zonos-v0.1 TTS Demo")
84
+ gr.Markdown(
85
+ """
86
+ > **Zero-shot TTS with Voice Cloning**: Input text and a 10–30 second speaker sample to generate high-quality text-to-speech output.
87
 
88
+ > **Audio Prefix Inputs**: Enhance speaker matching by adding an audio prefix to the text, enabling behaviors like whispering that are hard to achieve with voice cloning alone.
89
+
90
+ > **Multilingual Support**: Supports English, Japanese, Chinese, French, and German.
91
+ """
92
+ )
93
  with gr.Row():
94
  text_input = gr.Textbox(
95
  label="Text Prompt",