Spaces:
Running
Running
Quentin Lhoest
commited on
Commit
·
fcd2e79
1
Parent(s):
7dc275d
add "tags"
Browse files- apputils.py +1 -0
- requirements.txt +1 -1
- tagging_app.py +12 -0
apputils.py
CHANGED
|
@@ -13,4 +13,5 @@ def new_state() -> Dict[str, List]:
|
|
| 13 |
"size_categories": [],
|
| 14 |
"license": [],
|
| 15 |
"pretty_name": None,
|
|
|
|
| 16 |
}
|
|
|
|
| 13 |
"size_categories": [],
|
| 14 |
"license": [],
|
| 15 |
"pretty_name": None,
|
| 16 |
+
"tags": []
|
| 17 |
}
|
requirements.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
pyyaml
|
| 2 |
streamlit>=0.88.0
|
| 3 |
langcodes[data]
|
| 4 |
-
git+https://github.com/huggingface/datasets@
|
|
|
|
| 1 |
pyyaml
|
| 2 |
streamlit>=0.88.0
|
| 3 |
langcodes[data]
|
| 4 |
+
git+https://github.com/huggingface/datasets@dcef2f5ecf87aeb288ed6bd8583eac3380c84605#egg=datasets
|
tagging_app.py
CHANGED
|
@@ -370,6 +370,18 @@ if len(nonok) > 0:
|
|
| 370 |
state["size_categories"] = current_size_cats
|
| 371 |
|
| 372 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 373 |
########################
|
| 374 |
## Show results
|
| 375 |
########################
|
|
|
|
| 370 |
state["size_categories"] = current_size_cats
|
| 371 |
|
| 372 |
|
| 373 |
+
#
|
| 374 |
+
# ADDITIONAL TAGS
|
| 375 |
+
#
|
| 376 |
+
leftcol.markdown("### Tags")
|
| 377 |
+
tags_text_area = leftcol.text_area(
|
| 378 |
+
"What are the additional keywords one can use to find this dataset ? "
|
| 379 |
+
"expected format is a list of keywords separated by ';' "
|
| 380 |
+
"e.g. 'bio;research papers' or 'newspaper;1800-1900'"
|
| 381 |
+
)
|
| 382 |
+
state["tags"] = [tag.strip() for tag in tags_text_area.strip(";").split(";")] if tags_text_area.strip(" ;") else []
|
| 383 |
+
|
| 384 |
+
|
| 385 |
########################
|
| 386 |
## Show results
|
| 387 |
########################
|