Update app.py
Browse files
app.py
CHANGED
@@ -75,15 +75,17 @@ if __name__ == "__main__":
|
|
75 |
try:
|
76 |
os.remove("小碎片们.zip")
|
77 |
except:
|
78 |
-
print("
|
|
|
79 |
|
80 |
# genrate data
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
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")
|