Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
de2a1bf
1
Parent(s):
c463b7e
Update app.py
Browse files
app.py
CHANGED
@@ -91,31 +91,22 @@ def gradio_generate(prompt, steps, guidance):
|
|
91 |
|
92 |
return output_filename
|
93 |
|
94 |
-
# description_text = """
|
95 |
-
# <p><a href="https://huggingface.co/spaces/declare-lab/tango/blob/main/app.py?duplicate=true"> <img style="margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a> For faster inference without waiting in queue, you may duplicate the space and upgrade to a GPU in the settings. <br/><br/>
|
96 |
-
# Generate audio using TANGO by providing a text prompt.
|
97 |
-
# <br/><br/>Limitations: TANGO is trained on the small AudioCaps dataset so it may not generate good audio \
|
98 |
-
# samples related to concepts that it has not seen in training (e.g. singing). For the same reason, TANGO \
|
99 |
-
# is not always able to finely control its generations over textual control prompts. For example, \
|
100 |
-
# the generations from TANGO for prompts Chopping tomatoes on a wooden table and Chopping potatoes \
|
101 |
-
# on a metal table are very similar. \
|
102 |
-
# <br/><br/>We are currently training another version of TANGO on larger datasets to enhance its generalization, \
|
103 |
-
# compositional and controllable generation ability.
|
104 |
-
# <br/><br/>We recommend using a guidance scale of 3. The default number of steps is set to 100. More steps generally lead to better quality of generated audios but will take longer.
|
105 |
-
# <br/><br/>
|
106 |
-
# <h1> ChatGPT-enhanced audio generation</h1>
|
107 |
-
# <br/>
|
108 |
-
# As TANGO consists of an instruction-tuned LLM, it is able to process complex sound descriptions allowing us to provide more detailed instructions to improve the generation quality.
|
109 |
-
# For example, ``A boat is moving on the sea'' vs ``The sound of the water lapping against the hull of the boat or splashing as you move through the waves''. The latter is obtained by prompting ChatGPT to explain the sound generated when a boat moves on the sea.
|
110 |
-
# Using this ChatGPT-generated description of the sound, TANGO provides superior results.
|
111 |
-
# <p/>
|
112 |
-
# """
|
113 |
description_text = """
|
114 |
-
<p><a href="https://huggingface.co/spaces/declare-lab/
|
115 |
-
Generate audio using
|
116 |
-
<br
|
|
|
|
|
|
|
|
|
117 |
<p/>
|
118 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
# Gradio input and output components
|
120 |
input_text = gr.Textbox(lines=2, label="Prompt")
|
121 |
output_audio = gr.Audio(label="Generated Audio", type="filepath")
|
|
|
91 |
|
92 |
return output_filename
|
93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
description_text = """
|
95 |
+
<p><a href="https://huggingface.co/spaces/declare-lab/tango/blob/main/app.py?duplicate=true"> <img style="margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a> For faster inference without waiting in queue, you may duplicate the space and upgrade to a GPU in the settings. <br/><br/>
|
96 |
+
Generate audio using TANGO by providing a text prompt.
|
97 |
+
<br/>
|
98 |
+
<br/>
|
99 |
+
As TANGO consists of an instruction-tuned LLM, it is able to process complex sound descriptions allowing us to provide more detailed instructions to improve the generation quality.
|
100 |
+
For example, ``A boat is moving on the sea'' vs ``The sound of the water lapping against the hull of the boat or splashing as you move through the waves''. The latter is obtained by prompting ChatGPT to explain the sound generated when a boat moves on the sea.
|
101 |
+
Using this ChatGPT-generated description of the sound, TANGO provides superior results.
|
102 |
<p/>
|
103 |
"""
|
104 |
+
# description_text = """
|
105 |
+
# <p><a href="https://huggingface.co/spaces/declare-lab/tango2/blob/main/app.py?duplicate=true"> <img style="margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a> For faster inference without waiting in queue, you may duplicate the space and upgrade to a GPU in the settings. <br/><br/>
|
106 |
+
# Generate audio using Tango2 by providing a text prompt. Tango2 was built from Tango and was trained on <a href="https://huggingface.co/datasets/declare-lab/audio-alpaca">Audio-alpaca</a>
|
107 |
+
# <br/><br/> This is the demo for Tango2 for text to audio generation: <a href="https://arxiv.org/abs/2404.09956">Read our paper.</a>
|
108 |
+
# <p/>
|
109 |
+
# """
|
110 |
# Gradio input and output components
|
111 |
input_text = gr.Textbox(lines=2, label="Prompt")
|
112 |
output_audio = gr.Audio(label="Generated Audio", type="filepath")
|