xihajun commited on
Commit
1bb4ed2
1 Parent(s): 1300342

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -8
app.py CHANGED
@@ -75,15 +75,17 @@ if __name__ == "__main__":
75
  try:
76
  os.remove("小碎片们.zip")
77
  except:
78
- print("Error: %s" % (e.strerror))
 
79
 
80
  # genrate data
81
- shutil.move(outputname,"./small/"+outputname)
82
- split_wav = SplitWavAudioMubin("./small", outputname)
83
- split_wav.multiple_split(min_per_split=values)
84
- os.remove("./small/"+outputname)
85
- # downloadable button
86
- shutil.make_archive("小碎片们", 'zip', "small")
87
-
 
88
  with open("小碎片们.zip", 'rb') as f:
89
  st.download_button('Download File', f, file_name="小碎片们.zip")
 
75
  try:
76
  os.remove("小碎片们.zip")
77
  except:
78
+ print("There is not zip file, continue")
79
+ pass
80
 
81
  # genrate data
82
+ with st.spinner('Wait for cutting...'):
83
+ shutil.move(outputname,"./small/"+outputname)
84
+ split_wav = SplitWavAudioMubin("./small", outputname)
85
+ split_wav.multiple_split(min_per_split=values)
86
+ os.remove("./small/"+outputname)
87
+ # downloadable button
88
+ shutil.make_archive("小碎片们", 'zip', "small")
89
+
90
  with open("小碎片们.zip", 'rb') as f:
91
  st.download_button('Download File', f, file_name="小碎片们.zip")