Update app.py
Browse files
app.py
CHANGED
@@ -183,16 +183,17 @@ if st.button("Results"):
|
|
183 |
'start': ['index of the start of the corresponding entity'],
|
184 |
'end': ['index of the end of the corresponding entity'],
|
185 |
})
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
|
|
190 |
|
191 |
-
|
192 |
key="download_button",
|
193 |
css_styles="""button { background-color: yellow; border: 1px solid black; padding: 5px; color: black; }""",
|
194 |
):
|
195 |
-
|
196 |
label="Download zip file",
|
197 |
data=buf.getvalue(),
|
198 |
file_name="zip file.zip",
|
|
|
183 |
'start': ['index of the start of the corresponding entity'],
|
184 |
'end': ['index of the end of the corresponding entity'],
|
185 |
})
|
186 |
+
|
187 |
+
buf = io.BytesIO()
|
188 |
+
with zipfile.ZipFile(buf, "w") as myzip:
|
189 |
+
myzip.writestr("Summary of the results.csv", df.to_csv(index=False))
|
190 |
+
myzip.writestr("Glossary of labels.csv", dfa.to_csv(index=False))
|
191 |
|
192 |
+
with stylable_container(
|
193 |
key="download_button",
|
194 |
css_styles="""button { background-color: yellow; border: 1px solid black; padding: 5px; color: black; }""",
|
195 |
):
|
196 |
+
st.download_button(
|
197 |
label="Download zip file",
|
198 |
data=buf.getvalue(),
|
199 |
file_name="zip file.zip",
|