Spaces:
Runtime error
Runtime error
Commit
·
f6d4b17
1
Parent(s):
4ea8cea
minor fixes
Browse files
adjust.py
CHANGED
@@ -24,7 +24,7 @@ def get_current():
|
|
24 |
|
25 |
def prepare_output(input_file):
|
26 |
if input_file is None or not os.path.exists(input_file):
|
27 |
-
return
|
28 |
|
29 |
speakers = get_speakers(input_file)
|
30 |
adjust_speaker_update = adjust_speaker.update(
|
@@ -37,10 +37,7 @@ def prepare_output(input_file):
|
|
37 |
return [adjust_speaker_update, adjust_audio_update, prev_button_update, next_button_update, adjust_button_update]
|
38 |
|
39 |
|
40 |
-
def get_speakers(
|
41 |
-
if (input_file == None):
|
42 |
-
return [None, None]
|
43 |
-
|
44 |
global speaker_to_name
|
45 |
global speaker_to_sample
|
46 |
|
|
|
24 |
|
25 |
def prepare_output(input_file):
|
26 |
if input_file is None or not os.path.exists(input_file):
|
27 |
+
return [None, None, None, None, None]
|
28 |
|
29 |
speakers = get_speakers(input_file)
|
30 |
adjust_speaker_update = adjust_speaker.update(
|
|
|
37 |
return [adjust_speaker_update, adjust_audio_update, prev_button_update, next_button_update, adjust_button_update]
|
38 |
|
39 |
|
40 |
+
def get_speakers():
|
|
|
|
|
|
|
41 |
global speaker_to_name
|
42 |
global speaker_to_sample
|
43 |
|
app.py
CHANGED
@@ -33,7 +33,7 @@ with gr.Blocks() as demo:
|
|
33 |
with gr.Column():
|
34 |
output_video.render()
|
35 |
output_file.render()
|
36 |
-
output_file.change(prepare_output, inputs=
|
37 |
adjust_speaker, adjust_audio, prev_button, next_button, adjust_button])
|
38 |
with gr.Column():
|
39 |
output_transcribe.render()
|
|
|
33 |
with gr.Column():
|
34 |
output_video.render()
|
35 |
output_file.render()
|
36 |
+
output_file.change(prepare_output, inputs=output_video, outputs=[
|
37 |
adjust_speaker, adjust_audio, prev_button, next_button, adjust_button])
|
38 |
with gr.Column():
|
39 |
output_transcribe.render()
|