vskode commited on
Commit ·
683d9fe
1
Parent(s): ec99a0c
add option to download created files as archive, very simple initial implementation
Browse files
acodet/front_end/st_annotate.py
CHANGED
|
@@ -32,6 +32,7 @@ def initial_dropdown(key):
|
|
| 32 |
"0 - all of the above",
|
| 33 |
),
|
| 34 |
key=key,
|
|
|
|
| 35 |
help=help_strings.SELECT_PRESET,
|
| 36 |
)[0]
|
| 37 |
)
|
|
|
|
| 32 |
"0 - all of the above",
|
| 33 |
),
|
| 34 |
key=key,
|
| 35 |
+
index=3,
|
| 36 |
help=help_strings.SELECT_PRESET,
|
| 37 |
)[0]
|
| 38 |
)
|
acodet/front_end/st_visualization.py
CHANGED
|
@@ -59,6 +59,11 @@ def output():
|
|
| 59 |
disp.show_individual_files()
|
| 60 |
plot_tabs = Results(disp, tab_number=2)
|
| 61 |
plot_tabs.create_tabs()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
|
| 64 |
class ShowAnnotationPredictions:
|
|
|
|
| 59 |
disp.show_individual_files()
|
| 60 |
plot_tabs = Results(disp, tab_number=2)
|
| 61 |
plot_tabs.create_tabs()
|
| 62 |
+
import shutil
|
| 63 |
+
dir_name = st.session_state.to_dict()['generated_annotation_source']
|
| 64 |
+
shutil.make_archive(Path(dir_name).stem, 'zip', dir_name)
|
| 65 |
+
with open(Path(dir_name).stem + '.zip', 'rb') as f:
|
| 66 |
+
st.download_button('download files', f, file_name=Path(dir_name).stem + '.zip')
|
| 67 |
|
| 68 |
|
| 69 |
class ShowAnnotationPredictions:
|