Spaces:
Build error
Build error
Commit ยท
1f2dc3f
1
Parent(s): a75176e
Modify requirements.txt
Browse files
app.py
CHANGED
|
@@ -105,7 +105,7 @@ def load_model_cache():
|
|
| 105 |
def generate_audio_gradio(prompt, seed):
|
| 106 |
"""Generate audio from text prompt with fixed seed (CPU)."""
|
| 107 |
if not prompt or not prompt.strip():
|
| 108 |
-
raise gr.Error("
|
| 109 |
|
| 110 |
model_dict = load_model_cache()
|
| 111 |
|
|
@@ -150,23 +150,25 @@ input_text = gr.Textbox(lines=2, label="Prompt", placeholder="e.g. A bird is chi
|
|
| 150 |
seed = gr.Number(value=42, label="Seed", minimum=0, maximum=2**32 - 1, step=1, precision=0)
|
| 151 |
|
| 152 |
description_text = """
|
| 153 |
-
###
|
|
|
|
| 154 |
|
| 155 |
- [๐ Paper (arXiv)](https://arxiv.org/abs/2512.22166)
|
| 156 |
- [๐ป GitHub](https://github.com/SeaSky1027/AudioGAN)
|
| 157 |
- [๐ค Hugging Face Model](https://huggingface.co/SeaSky1027/AudioGAN)
|
| 158 |
- [๐ Project Page](https://seasky1027.github.io/AudioGAN/)
|
| 159 |
|
| 160 |
-
|
|
|
|
|
|
|
|
|
|
| 161 |
"""
|
| 162 |
|
| 163 |
# Examples: Prompt and Seed only (no duration, steps, variant, etc.)
|
| 164 |
examples_list = [
|
| 165 |
-
["
|
| 166 |
-
["
|
| 167 |
-
["Melodic human whistling harmonizing with natural birdsong",
|
| 168 |
-
["Chopping meat on a wooden table.", 0],
|
| 169 |
-
["A vehicle engine revving then accelerating at a high rate.", 2024],
|
| 170 |
]
|
| 171 |
|
| 172 |
gr_interface = gr.Interface(
|
|
@@ -176,7 +178,7 @@ gr_interface = gr.Interface(
|
|
| 176 |
gr.Audio(label="๐ต Audio Sample", type="filepath"),
|
| 177 |
gr.Textbox(label="Prompt Used", interactive=False),
|
| 178 |
],
|
| 179 |
-
title="AudioGAN: Text-to-Audio Generation",
|
| 180 |
description=description_text,
|
| 181 |
flagging_mode="never",
|
| 182 |
examples=examples_list,
|
|
|
|
| 105 |
def generate_audio_gradio(prompt, seed):
|
| 106 |
"""Generate audio from text prompt with fixed seed (CPU)."""
|
| 107 |
if not prompt or not prompt.strip():
|
| 108 |
+
raise gr.Error("Enter the prompt.")
|
| 109 |
|
| 110 |
model_dict = load_model_cache()
|
| 111 |
|
|
|
|
| 150 |
seed = gr.Number(value=42, label="Seed", minimum=0, maximum=2**32 - 1, step=1, precision=0)
|
| 151 |
|
| 152 |
description_text = """
|
| 153 |
+
###
|
| 154 |
+
AudioGAN is a novel GAN-based model tailored for compact and efficient text-to-audio generation.
|
| 155 |
|
| 156 |
- [๐ Paper (arXiv)](https://arxiv.org/abs/2512.22166)
|
| 157 |
- [๐ป GitHub](https://github.com/SeaSky1027/AudioGAN)
|
| 158 |
- [๐ค Hugging Face Model](https://huggingface.co/SeaSky1027/AudioGAN)
|
| 159 |
- [๐ Project Page](https://seasky1027.github.io/AudioGAN/)
|
| 160 |
|
| 161 |
+
This space uses only the CPU.
|
| 162 |
+
So, model inference may be slow.
|
| 163 |
+
Download the code from GitHub and the weights from huggingface.
|
| 164 |
+
Then, run inference on your own GPU for faster results.
|
| 165 |
"""
|
| 166 |
|
| 167 |
# Examples: Prompt and Seed only (no duration, steps, variant, etc.)
|
| 168 |
examples_list = [
|
| 169 |
+
["Chopping meat on a wooden table.", 10],
|
| 170 |
+
["A bird is chirping in a quiet place.", 27],
|
| 171 |
+
["Melodic human whistling harmonizing with natural birdsong", 1027],
|
|
|
|
|
|
|
| 172 |
]
|
| 173 |
|
| 174 |
gr_interface = gr.Interface(
|
|
|
|
| 178 |
gr.Audio(label="๐ต Audio Sample", type="filepath"),
|
| 179 |
gr.Textbox(label="Prompt Used", interactive=False),
|
| 180 |
],
|
| 181 |
+
title="AudioGAN: A Compact and Efficient Framework for Real-Time High-Fidelity Text-to-Audio Generation",
|
| 182 |
description=description_text,
|
| 183 |
flagging_mode="never",
|
| 184 |
examples=examples_list,
|