Update app.py
Browse files
app.py
CHANGED
|
@@ -2,6 +2,7 @@ import streamlit as st
|
|
| 2 |
import pandas as pd
|
| 3 |
import transformers
|
| 4 |
import re
|
|
|
|
| 5 |
import zipfile
|
| 6 |
import postt
|
| 7 |
from postt import postcor
|
|
@@ -305,15 +306,13 @@ if submit and len(x) != 0:
|
|
| 305 |
mime='text/csv',
|
| 306 |
)
|
| 307 |
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
| 315 |
-
|
| 316 |
-
)
|
| 317 |
|
| 318 |
|
| 319 |
|
|
|
|
| 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 |
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 |
|