Update app.py
Browse files
app.py
CHANGED
@@ -135,13 +135,15 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
135 |
print(" audio: ",audio, " youtube_url: ", youtube_url)
|
136 |
last_modified =1
|
137 |
# Button is interactive if there's input and progress is 0 or 1 (not in progress)
|
138 |
-
return gr.
|
|
|
|
|
139 |
def update_button_state_youtube(audio, youtube_url):
|
140 |
global last_modified
|
141 |
print(" youtube: ",audio, " youtube_url: ", youtube_url)
|
142 |
last_modified=2
|
143 |
# Button is interactive if there's input and progress is 0 or 1 (not in progress)
|
144 |
-
return gr.
|
145 |
|
146 |
audio_input.change(
|
147 |
fn=update_button_state_audio,
|
|
|
135 |
print(" audio: ",audio, " youtube_url: ", youtube_url)
|
136 |
last_modified =1
|
137 |
# Button is interactive if there's input and progress is 0 or 1 (not in progress)
|
138 |
+
return gr.update(interactive=bool(audio) or bool(youtube_url !=""))
|
139 |
+
#return {run_button: gr.update(interactive=bool(audio) or bool(youtube_url != ""))}
|
140 |
+
|
141 |
def update_button_state_youtube(audio, youtube_url):
|
142 |
global last_modified
|
143 |
print(" youtube: ",audio, " youtube_url: ", youtube_url)
|
144 |
last_modified=2
|
145 |
# Button is interactive if there's input and progress is 0 or 1 (not in progress)
|
146 |
+
return gr.update(interactive=bool(audio) or bool(youtube_url !=""))
|
147 |
|
148 |
audio_input.change(
|
149 |
fn=update_button_state_audio,
|