dexay commited on
Commit
62b94ab
·
1 Parent(s): 67c91ed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -2,7 +2,7 @@ import streamlit as st
2
  import pandas as pd
3
  import transformers
4
  import re
5
- import base64
6
  import zipfile
7
  import postt
8
  from postt import postcor
@@ -306,13 +306,13 @@ if submit and len(x) != 0:
306
  mime='text/csv',
307
  )
308
 
309
- with open(zipf, "rb") as f:
310
- bytes = f.read()
311
- b64 = base64.b64encode(bytes).decode()
312
- href = f'<a href="data:file/zip;base64,{b64}" download=\'allcsvs.zip\'>\
313
- Click to download\
314
- </a>'
315
- st.sidebar.markdown(href, unsafe_allow_html=True)
316
 
317
 
318
 
 
2
  import pandas as pd
3
  import transformers
4
  import re
5
+
6
  import zipfile
7
  import postt
8
  from postt import postcor
 
306
  mime='text/csv',
307
  )
308
 
309
+ with open("allcsvs.zip", "rb") as fp:
310
+ btn = st.download_button(
311
+ label="Download ZIP",
312
+ data=fp,
313
+ file_name="SeperateCsvs.zip",
314
+ mime="application/zip"
315
+ )
316
 
317
 
318