Spaces:
Running
Running
Yacine Jernite
commited on
Commit
•
feae7e1
1
Parent(s):
b468d19
pre_open
Browse files- tagging_app.py +3 -3
tagging_app.py
CHANGED
@@ -444,7 +444,7 @@ if c3.button("Done? Save to File!"):
|
|
444 |
_ = os.mkdir(pjoin('saved_tags', dataset_id, config_id))
|
445 |
json.dump(res, open(pjoin('saved_tags', dataset_id, config_id, 'tags.json'), 'w'))
|
446 |
|
447 |
-
with c3.beta_expander("Show YAML output aggregating the tags saved for all configs"):
|
448 |
task_saved_configs = dict([
|
449 |
(Path(fname).parent.name, json.load(open(fname)))
|
450 |
for fname in glob(f"saved_tags/{dataset_id}/*/tags.json")
|
@@ -460,9 +460,9 @@ with c3.beta_expander("Show YAML output aggregating the tags saved for all confi
|
|
460 |
else:
|
461 |
for conf_name in aggregate_config[tag_k]:
|
462 |
aggregate_config[tag_k][conf_name] = list(aggregate_config[tag_k][conf_name])
|
463 |
-
st.text(yaml.dump(aggregate_config))
|
464 |
|
465 |
-
with c3.beta_expander(f"Show Markdown Data
|
466 |
st.text('\n'.join(feature_descs))
|
467 |
|
468 |
with c3.beta_expander("Show JSON output for the current config"):
|
|
|
444 |
_ = os.mkdir(pjoin('saved_tags', dataset_id, config_id))
|
445 |
json.dump(res, open(pjoin('saved_tags', dataset_id, config_id, 'tags.json'), 'w'))
|
446 |
|
447 |
+
with c3.beta_expander("Show YAML output aggregating the tags saved for all configs", expanded=False):
|
448 |
task_saved_configs = dict([
|
449 |
(Path(fname).parent.name, json.load(open(fname)))
|
450 |
for fname in glob(f"saved_tags/{dataset_id}/*/tags.json")
|
|
|
460 |
else:
|
461 |
for conf_name in aggregate_config[tag_k]:
|
462 |
aggregate_config[tag_k][conf_name] = list(aggregate_config[tag_k][conf_name])
|
463 |
+
st.text('---\n' + yaml.dump(aggregate_config) + '---')
|
464 |
|
465 |
+
with c3.beta_expander(f"Show Markdown Data Fields for config: {config_id}", expanded=True):
|
466 |
st.text('\n'.join(feature_descs))
|
467 |
|
468 |
with c3.beta_expander("Show JSON output for the current config"):
|