Spaces:
Sleeping
Sleeping
SefyanKehail
commited on
Commit
·
563e82f
1
Parent(s):
38cae36
adding disabling button until audio is ready
Browse files
app.py
CHANGED
|
@@ -251,6 +251,11 @@ def output_conf():
|
|
| 251 |
interactive=False,
|
| 252 |
)
|
| 253 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 254 |
|
| 255 |
def get_gui(theme):
|
| 256 |
with gr.Blocks(theme=theme) as app:
|
|
@@ -267,6 +272,9 @@ def get_gui(theme):
|
|
| 267 |
button_base = button_conf()
|
| 268 |
output_base = output_conf()
|
| 269 |
|
|
|
|
|
|
|
|
|
|
| 270 |
button_base.click(
|
| 271 |
run,
|
| 272 |
inputs=[
|
|
|
|
| 251 |
interactive=False,
|
| 252 |
)
|
| 253 |
|
| 254 |
+
def enable_convert_button(audio):
|
| 255 |
+
if audio is not None:
|
| 256 |
+
return gr.update(interactive=True)
|
| 257 |
+
return gr.update(interactive=False)
|
| 258 |
+
|
| 259 |
|
| 260 |
def get_gui(theme):
|
| 261 |
with gr.Blocks(theme=theme) as app:
|
|
|
|
| 272 |
button_base = button_conf()
|
| 273 |
output_base = output_conf()
|
| 274 |
|
| 275 |
+
aud.change(enable_convert_button, inputs=[aud], outputs=[button_base])
|
| 276 |
+
|
| 277 |
+
|
| 278 |
button_base.click(
|
| 279 |
run,
|
| 280 |
inputs=[
|