Spaces:
Runtime error
Runtime error
Fabrice-TIERCELIN
commited on
Print arguments
Browse files
app.py
CHANGED
@@ -58,9 +58,9 @@ class Tango:
|
|
58 |
def generate(self, prompt, steps = 100, guidance = 3, samples = 1, disable_progress = True):
|
59 |
# Generate audio for a single prompt string
|
60 |
with torch.no_grad():
|
61 |
-
print(self.model.
|
62 |
-
print(self.vae.
|
63 |
-
print(self.
|
64 |
latents = self.model.inference([prompt], self.scheduler, steps, guidance, samples, disable_progress = disable_progress)
|
65 |
mel = self.vae.decode_first_stage(latents)
|
66 |
wave = self.vae.decode_to_waveform(mel)
|
@@ -107,9 +107,9 @@ def check(
|
|
107 |
|
108 |
def update_output(output_format, output_number):
|
109 |
return [
|
110 |
-
gr.update(
|
111 |
-
gr.update(visible = (2 <= output_number)),
|
112 |
-
gr.update(visible = (output_number == 3)),
|
113 |
gr.update(visible = False)
|
114 |
]
|
115 |
|
@@ -164,7 +164,7 @@ with gr.Blocks() as interface:
|
|
164 |
</ul>
|
165 |
<br/>
|
166 |
π Slow process... ~2 hours. Your computer must <b><u>not</u></b> enter into standby mode.<br/>You can duplicate this space on a free account, it works on CPU.<br/>
|
167 |
-
<a href='https://huggingface.co/spaces/Fabrice-TIERCELIN/Text-to-Audio?duplicate=true'><img src='https://img.shields.io/badge/-Duplicate%20Space-blue?labelColor=white&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&logoWidth=14'></a>
|
168 |
<br/>
|
169 |
βοΈ You can use, modify and share the generated sounds but not for commercial uses.
|
170 |
"""
|
@@ -180,9 +180,9 @@ with gr.Blocks() as interface:
|
|
180 |
|
181 |
submit = gr.Button("π Generate", variant = "primary")
|
182 |
|
183 |
-
output_audio_1 = gr.
|
184 |
-
output_audio_2 = gr.
|
185 |
-
output_audio_3 = gr.
|
186 |
information = gr.Label(label = "Information")
|
187 |
|
188 |
submit.click(fn = update_seed, inputs = [
|
|
|
58 |
def generate(self, prompt, steps = 100, guidance = 3, samples = 1, disable_progress = True):
|
59 |
# Generate audio for a single prompt string
|
60 |
with torch.no_grad():
|
61 |
+
print(self.model.inference.__code__.co_varnames)
|
62 |
+
print(self.vae.decode_first_stage.__code__.co_varnames)
|
63 |
+
print(self.vae.decode_to_waveform.__code__.co_varnames)
|
64 |
latents = self.model.inference([prompt], self.scheduler, steps, guidance, samples, disable_progress = disable_progress)
|
65 |
mel = self.vae.decode_first_stage(latents)
|
66 |
wave = self.vae.decode_to_waveform(mel)
|
|
|
107 |
|
108 |
def update_output(output_format, output_number):
|
109 |
return [
|
110 |
+
gr.update(format = output_format),
|
111 |
+
gr.update(format = output_format, visible = (2 <= output_number)),
|
112 |
+
gr.update(format = output_format, visible = (output_number == 3)),
|
113 |
gr.update(visible = False)
|
114 |
]
|
115 |
|
|
|
164 |
</ul>
|
165 |
<br/>
|
166 |
π Slow process... ~2 hours. Your computer must <b><u>not</u></b> enter into standby mode.<br/>You can duplicate this space on a free account, it works on CPU.<br/>
|
167 |
+
<a href='https://huggingface.co/spaces/Fabrice-TIERCELIN/Text-to-Audio?duplicate=true&hidden=public&hidden=public'><img src='https://img.shields.io/badge/-Duplicate%20Space-blue?labelColor=white&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&logoWidth=14'></a>
|
168 |
<br/>
|
169 |
βοΈ You can use, modify and share the generated sounds but not for commercial uses.
|
170 |
"""
|
|
|
180 |
|
181 |
submit = gr.Button("π Generate", variant = "primary")
|
182 |
|
183 |
+
output_audio_1 = gr.Audio(label = "Generated Audio #1/3", format = "wav", type="numpy", autoplay = True)
|
184 |
+
output_audio_2 = gr.Audio(label = "Generated Audio #2/3", format = "wav", type="numpy")
|
185 |
+
output_audio_3 = gr.Audio(label = "Generated Audio #3/3", format = "wav", type="numpy")
|
186 |
information = gr.Label(label = "Information")
|
187 |
|
188 |
submit.click(fn = update_seed, inputs = [
|