siriuszeina commited on
Commit
5d2a4e3
1 Parent(s): 330a6d1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -5,6 +5,8 @@ if os.path.exists("./output/") == False:
5
  os.mkdir("./output/")
6
 
7
  archived = shutil.make_archive("./output.zip", 'zip', "./output/")
8
- if st.download_button(label="Download output "+str(len(os.listdir("./output/"))), data=archived, file_name='output.zip', mime='application/x-zip'):
9
- st.write("download")
10
- st.write(os.listdir("./"))
 
 
 
5
  os.mkdir("./output/")
6
 
7
  archived = shutil.make_archive("./output.zip", 'zip', "./output/")
8
+ output_num = len(os.listdir("./output/"))
9
+ if output_num > 0:
10
+ st.download_button(label="Download "+str(output_num)+" file", data=archived, file_name='output.zip', mime='application/x-zip'):
11
+
12
+ print(os.listdir("./"))