Spaces:
Runtime error
Runtime error
Fabrice-TIERCELIN
commited on
Commit
•
02b252c
1
Parent(s):
57093c2
Display information at the end
Browse files
app.py
CHANGED
@@ -96,7 +96,8 @@ def update_output(output_format, output_number):
|
|
96 |
return [
|
97 |
gr.update(format = output_format),
|
98 |
gr.update(format = output_format, visible = (2 <= output_number)),
|
99 |
-
gr.update(format = output_format, visible = (output_number == 3))
|
|
|
100 |
]
|
101 |
|
102 |
def text2audio(
|
@@ -122,7 +123,7 @@ def text2audio(
|
|
122 |
output_wave_1,
|
123 |
output_wave_2,
|
124 |
output_wave_3,
|
125 |
-
"Start again to get a different result. The output have been generated in " + ((str(hours) + " h, ") if hours != 0 else "") + ((str(minutes) + " min, ") if hours != 0 or minutes != 0 else "") + str(secondes) + " sec."
|
126 |
]
|
127 |
|
128 |
# Gradio interface
|
@@ -171,7 +172,8 @@ with gr.Blocks() as interface:
|
|
171 |
], outputs = [
|
172 |
output_audio_1,
|
173 |
output_audio_2,
|
174 |
-
output_audio_3
|
|
|
175 |
], queue = False, show_progress = False).success(fn = text2audio, inputs = [
|
176 |
input_text,
|
177 |
output_number,
|
|
|
96 |
return [
|
97 |
gr.update(format = output_format),
|
98 |
gr.update(format = output_format, visible = (2 <= output_number)),
|
99 |
+
gr.update(format = output_format, visible = (output_number == 3)),
|
100 |
+
gr.update(visible = False)
|
101 |
]
|
102 |
|
103 |
def text2audio(
|
|
|
123 |
output_wave_1,
|
124 |
output_wave_2,
|
125 |
output_wave_3,
|
126 |
+
gr.update(visible = True, value = "Start again to get a different result. The output have been generated in " + ((str(hours) + " h, ") if hours != 0 else "") + ((str(minutes) + " min, ") if hours != 0 or minutes != 0 else "") + str(secondes) + " sec.")
|
127 |
]
|
128 |
|
129 |
# Gradio interface
|
|
|
172 |
], outputs = [
|
173 |
output_audio_1,
|
174 |
output_audio_2,
|
175 |
+
output_audio_3,
|
176 |
+
information
|
177 |
], queue = False, show_progress = False).success(fn = text2audio, inputs = [
|
178 |
input_text,
|
179 |
output_number,
|