add rlhf
Browse files
app.py
CHANGED
@@ -147,7 +147,7 @@ def generate_audio_gradio(
|
|
147 |
|
148 |
rng = torch.Generator(device=device)
|
149 |
# force to 42
|
150 |
-
|
151 |
|
152 |
audios = generation_func(
|
153 |
[prompt]*NUM_SAMPLE,
|
@@ -191,6 +191,27 @@ duration = gr.Slider(minimum=1, maximum=30, value=10, step=1, label="Duration",
|
|
191 |
# seed = gr.Slider(minimum=1, maximum=1000000, value=42, step=1, label="Seed", interactive=True)
|
192 |
variant = gr.Dropdown(label="Model Variant", choices=list(all_model_cfg.keys()), value='meanaudio_s_full', interactive=True)
|
193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
gr_interface = gr.Interface(
|
195 |
fn=generate_audio_gradio,
|
196 |
inputs=[input_text, duration, cfg_strength, denoising_steps, variant],
|
|
|
147 |
|
148 |
rng = torch.Generator(device=device)
|
149 |
# force to 42
|
150 |
+
rng.manual_seed(42)
|
151 |
|
152 |
audios = generation_func(
|
153 |
[prompt]*NUM_SAMPLE,
|
|
|
191 |
# seed = gr.Slider(minimum=1, maximum=1000000, value=42, step=1, label="Seed", interactive=True)
|
192 |
variant = gr.Dropdown(label="Model Variant", choices=list(all_model_cfg.keys()), value='meanaudio_s_full', interactive=True)
|
193 |
|
194 |
+
|
195 |
+
description_text = """
|
196 |
+
**MeanAudio** is a novel text-to-audio generator that uses **MeanFlow** to synthesize realistic and faithful audio in few sampling steps. It achieves state-of-the-art performance in single-step audio generation and delivers strong performance in multi-step audio generation.
|
197 |
+
|
198 |
+
<div style="display: flex; gap: 10px; align-items: center;">
|
199 |
+
<a href="https://huggingface.co/AndreasXi/MeanAudio">
|
200 |
+
<img src="https://img.shields.io/badge/Model-HuggingFace-violet?logo=huggingface" alt="Hugging Face Model">
|
201 |
+
</a>
|
202 |
+
<a href="https://huggingface.co/spaces/chenxie95/MeanAudio">
|
203 |
+
<img src="https://img.shields.io/badge/Space-HuggingFace-8A2BE2?logo=huggingface" alt="Hugging Face Space">
|
204 |
+
</a>
|
205 |
+
<a href="https://meanaudio.github.io/">
|
206 |
+
<img src="https://img.shields.io/badge/Project-Page-brightred?style=flat" alt="Project Page">
|
207 |
+
</a>
|
208 |
+
<a href="https://github.com/xiquan-li/MeanAudio">
|
209 |
+
<img src="https://img.shields.io/badge/Code-GitHub-black?logo=github" alt="GitHub">
|
210 |
+
</a>
|
211 |
+
</div>
|
212 |
+
"""
|
213 |
+
|
214 |
+
|
215 |
gr_interface = gr.Interface(
|
216 |
fn=generate_audio_gradio,
|
217 |
inputs=[input_text, duration, cfg_strength, denoising_steps, variant],
|