Spaces:
Sleeping
Sleeping
Commit
·
e7a030a
1
Parent(s):
861c9e0
update
Browse files
app.py
CHANGED
@@ -796,7 +796,7 @@ with gr.Blocks() as demo:
|
|
796 |
stage2_info["state"] = "interrupted"
|
797 |
return stage2_info, gr.Button(interactive=False), gr.Markdown(visible=False)
|
798 |
|
799 |
-
def
|
800 |
rootpath = os.path.dirname(str(in_data))
|
801 |
# delete the previous folder(s) of Stage2
|
802 |
folders = [ f.path for f in os.scandir(rootpath) if f.is_dir()]
|
@@ -881,7 +881,7 @@ with gr.Blocks() as demo:
|
|
881 |
out_data_file : gr.File(new_filename, visible=True)}
|
882 |
|
883 |
run_btn.click(
|
884 |
-
fn =
|
885 |
inputs = [in_data_file, in_samplerate, in_modelname],
|
886 |
outputs = [stage2_json, run_btn, cancel_btn, batch_md, out_data_file]
|
887 |
).success(
|
|
|
796 |
stage2_info["state"] = "interrupted"
|
797 |
return stage2_info, gr.Button(interactive=False), gr.Markdown(visible=False)
|
798 |
|
799 |
+
def reset_stage2(in_data, samplerate, modelname):
|
800 |
rootpath = os.path.dirname(str(in_data))
|
801 |
# delete the previous folder(s) of Stage2
|
802 |
folders = [ f.path for f in os.scandir(rootpath) if f.is_dir()]
|
|
|
881 |
out_data_file : gr.File(new_filename, visible=True)}
|
882 |
|
883 |
run_btn.click(
|
884 |
+
fn = reset_stage2,
|
885 |
inputs = [in_data_file, in_samplerate, in_modelname],
|
886 |
outputs = [stage2_json, run_btn, cancel_btn, batch_md, out_data_file]
|
887 |
).success(
|