Spaces:
Running
Running
Quentin Lhoest
commited on
Commit
·
febdd8b
1
Parent(s):
6356cbd
minor
Browse files- tagging_app.py +3 -2
tagging_app.py
CHANGED
|
@@ -175,7 +175,6 @@ st.sidebar.markdown(app_desc)
|
|
| 175 |
# option to only select from datasets that still need to be annotated
|
| 176 |
only_missing = st.sidebar.checkbox("Show only un-annotated configs")
|
| 177 |
|
| 178 |
-
|
| 179 |
if only_missing:
|
| 180 |
dataset_choose_list = ["local dataset"] + [did for did, c_dict in all_dataset_infos.items()
|
| 181 |
if not all([cid in existing_tag_sets.get(did, {}) for cid in c_dict])]
|
|
@@ -191,7 +190,7 @@ dataset_id = st.sidebar.selectbox(
|
|
| 191 |
all_info_dicts = {}
|
| 192 |
if dataset_id == "local dataset":
|
| 193 |
path_to_info = st.sidebar.text_input("Please enter the path to the folder where the dataset_infos.json file was generated", "/path/to/dataset/")
|
| 194 |
-
if path_to_info
|
| 195 |
dataset_infos = json.load(open(pjoin(path_to_info, "dataset_infos.json")))
|
| 196 |
confs = dataset_infos.keys()
|
| 197 |
all_info_dicts = {}
|
|
@@ -210,6 +209,8 @@ if dataset_id == "local dataset":
|
|
| 210 |
'splits': {},
|
| 211 |
}
|
| 212 |
}
|
|
|
|
|
|
|
| 213 |
|
| 214 |
if only_missing:
|
| 215 |
config_choose_list = [cid for cid in all_info_dicts
|
|
|
|
| 175 |
# option to only select from datasets that still need to be annotated
|
| 176 |
only_missing = st.sidebar.checkbox("Show only un-annotated configs")
|
| 177 |
|
|
|
|
| 178 |
if only_missing:
|
| 179 |
dataset_choose_list = ["local dataset"] + [did for did, c_dict in all_dataset_infos.items()
|
| 180 |
if not all([cid in existing_tag_sets.get(did, {}) for cid in c_dict])]
|
|
|
|
| 190 |
all_info_dicts = {}
|
| 191 |
if dataset_id == "local dataset":
|
| 192 |
path_to_info = st.sidebar.text_input("Please enter the path to the folder where the dataset_infos.json file was generated", "/path/to/dataset/")
|
| 193 |
+
if path_to_info not in ["/path/to/dataset/", ""]:
|
| 194 |
dataset_infos = json.load(open(pjoin(path_to_info, "dataset_infos.json")))
|
| 195 |
confs = dataset_infos.keys()
|
| 196 |
all_info_dicts = {}
|
|
|
|
| 209 |
'splits': {},
|
| 210 |
}
|
| 211 |
}
|
| 212 |
+
else:
|
| 213 |
+
all_info_dicts = all_dataset_infos[dataset_id]
|
| 214 |
|
| 215 |
if only_missing:
|
| 216 |
config_choose_list = [cid for cid in all_info_dicts
|