Quentin Lhoest commited on
Commit
fcd2e79
1 Parent(s): 7dc275d

add "tags"

Browse files
Files changed (3) hide show
  1. apputils.py +1 -0
  2. requirements.txt +1 -1
  3. 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@7e514c312fcc1d4b8f8e297df5549f669bfb30f8#egg=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
  ########################