rahul7star commited on
Commit
5a9dfec
·
verified ·
1 Parent(s): defd1c3

Update app_quant.py

Browse files
Files changed (1) hide show
  1. app_quant.py +22 -16
app_quant.py CHANGED
@@ -188,22 +188,7 @@ def generate_audio_from_model(model_to_use, description, text, fname="tts.wav"):
188
  css = ".gradio-container {max-width: 1400px}"
189
  with gr.Blocks(title="NAVA — VEEN + LoRA + SNAC (Optimized)", css=css) as demo:
190
  gr.Markdown("# 🪶 NAVA — VEEN + LoRA + SNAC (Optimized)\nGenerate emotional Hindi speech using Maya1 base + your LoRA adapter.")
191
- # -----------------------------
192
- # Example section
193
- # -----------------------------
194
- gr.Markdown("### Example")
195
- example_text = DEFAULT_TEXT
196
- example_audio_path = "audio.wav"
197
-
198
- gr.Textbox(label="Example Text", value=example_text, lines=2, interactive=False)
199
- gr.Audio(label="Example Audio", value=example_audio_path, type="filepath", interactive=False)
200
- gr.Video(
201
- label="Example Video",
202
- value="gen_31ff9f64b1.mp4", # <-- path to .mp4/.webm file
203
- autoplay=False,
204
- loop=False,
205
- interactive=False
206
- )
207
 
208
  with gr.Row():
209
  with gr.Column(scale=3):
@@ -220,6 +205,27 @@ with gr.Blocks(title="NAVA — VEEN + LoRA + SNAC (Optimized)", css=css) as demo
220
  audio_output_base = gr.Audio(label="Base Model Audio", type="filepath")
221
  audio_output_lora = gr.Audio(label="LoRA Model Audio", type="filepath")
222
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
223
  # preset -> description update
224
  def _update_desc(preset_name):
225
  return PRESET_CHARACTERS.get(preset_name, {}).get("description", "")
 
188
  css = ".gradio-container {max-width: 1400px}"
189
  with gr.Blocks(title="NAVA — VEEN + LoRA + SNAC (Optimized)", css=css) as demo:
190
  gr.Markdown("# 🪶 NAVA — VEEN + LoRA + SNAC (Optimized)\nGenerate emotional Hindi speech using Maya1 base + your LoRA adapter.")
191
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
192
 
193
  with gr.Row():
194
  with gr.Column(scale=3):
 
205
  audio_output_base = gr.Audio(label="Base Model Audio", type="filepath")
206
  audio_output_lora = gr.Audio(label="LoRA Model Audio", type="filepath")
207
 
208
+ # -----------------------------
209
+ # Example section
210
+ # -----------------------------
211
+ gr.Markdown("### Example")
212
+ example_text = DEFAULT_TEXT
213
+ example_audio_path = "audio.wav"
214
+
215
+ gr.Textbox(label="Example Text", value=example_text, lines=2, interactive=False)
216
+ gr.Audio(label="Example Audio", value=example_audio_path, type="filepath", interactive=False)
217
+ with gr.Blocks(css=".video_box {width: 600px; height: 350px;}") as demo:
218
+ gr.Video(
219
+ label="Example Video",
220
+ value="gen_31ff9f64b1.mp4",
221
+ autoplay=False,
222
+ loop=False,
223
+ interactive=False,
224
+ elem_classes=["video_box"]
225
+ )
226
+
227
+
228
+
229
  # preset -> description update
230
  def _update_desc(preset_name):
231
  return PRESET_CHARACTERS.get(preset_name, {}).get("description", "")