audrey06100 commited on
Commit
861c9e0
·
1 Parent(s): d941b9c
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -296,9 +296,9 @@ with gr.Blocks() as demo:
296
 
297
  rootpath = os.path.dirname(str(in_loc))
298
  # delete the previous folder(s) of Stage1
299
- subfolders = [ f.path for f in os.scandir(rootpath) if f.is_dir()]
300
- for subfolder in subfolders:
301
- utils.dataDelete(subfolder)
302
  # establish a new folder
303
  stage1_id = uuid.uuid4().hex
304
  os.mkdir(rootpath+"/"+stage1_id+"/")
@@ -799,9 +799,9 @@ with gr.Blocks() as demo:
799
  def reset_run(in_data, samplerate, modelname):
800
  rootpath = os.path.dirname(str(in_data))
801
  # delete the previous folder(s) of Stage2
802
- subfolders = [ f.path for f in os.scandir(rootpath) if f.is_dir()]
803
- for subfolder in subfolders:
804
- utils.dataDelete(subfolder)
805
  # establish a new folder
806
  stage2_id = uuid.uuid4().hex
807
  os.mkdir(rootpath+"/"+stage2_id+"/")
 
296
 
297
  rootpath = os.path.dirname(str(in_loc))
298
  # delete the previous folder(s) of Stage1
299
+ folders = [ f.path for f in os.scandir(rootpath) if f.is_dir()]
300
+ for folder in folders:
301
+ utils.dataDelete(folder)
302
  # establish a new folder
303
  stage1_id = uuid.uuid4().hex
304
  os.mkdir(rootpath+"/"+stage1_id+"/")
 
799
  def reset_run(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()]
803
+ for folder in folders:
804
+ utils.dataDelete(folder)
805
  # establish a new folder
806
  stage2_id = uuid.uuid4().hex
807
  os.mkdir(rootpath+"/"+stage2_id+"/")