Spaces:
Running
Running
Align more metadata with other repo types (models,spaces) (#2)
Browse files- rm GitHub Action (4a3daec80d4aed1eaee735aec7c87dd38354f998)
- `licenses:` => `license:` (35237ea94ff6c278cca5b56e1fa3c92b28564c35)
- `languages:` => `language:` (560591921d23cfc84360565ab9bc17be8da9f0f8)
Co-authored-by: Julien Chaumond <julien-c@users.noreply.huggingface.co>
Files changed (3)
- .github/workflows/deploy.ymlDeleted-37
- apputils.py+2-2
- tagging_app.py+7-14
12345678910111213141516171819202122232425262728293031323334353637name: Deployment
on: push: branches: - main workflow_dispatch:
jobs: deployment: runs-on: ubuntu-latest steps: - name: Check out uses: actions/checkout@v2 with: fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v2 with: python-version: "3.6" - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt - name: Build metadata file run: | python build_metadata_file.py - name: Commit metadata file run: | git config user.name github-actions git config user.email github-actions@github.com git add -f metadata_* git commit -m "Add metadata file" - name: Push to Hub env: HF_TOKEN: ${{ secrets.HF_TOKEN }} run: git push --force https://albertvillanova:$HF_TOKEN@huggingface.co/spaces/huggingface/datasets-tagging main5 unmodified lines6789101112131415165 unmodified lines"task_categories": [],"task_ids": [],"multilinguality": [],"languages": [],"language_creators": [],"annotations_creators": [],"source_datasets": [],"size_categories": [],"licenses": [],"pretty_name": None,}5 unmodified lines6789101112131415165 unmodified lines"task_categories": [],"task_ids": [],"multilinguality": [],"language": [],"language_creators": [],"annotations_creators": [],"source_datasets": [],"size_categories": [],"license": [],"pretty_name": None,}
257 unmodified lines2582592602612622632648 unmodified lines27327427527627727827917 unmodified lines297298299300301302303304305306307308309310311312313314315316317318319257 unmodified linesstate["multilinguality"][state["multilinguality"].index("other")] = f"other-{other_multilinguality}"valid_values, invalid_values = list(), list()for langtag in state["languages"]:try:lc.get(langtag)valid_values.append(langtag)8 unmodified lines"What languages are represented in the dataset? expected format is BCP47 tags separated for ';' e.g. 'en;fr'",value=";".join(valid_values),)state["languages"] = langtags.strip().split(";") if langtags.strip() != "" else []#17 unmodified lines## LICENSES#state["licenses"] = multiselect(leftcol,"Licenses","What licenses is the dataset under?",valid_set=list(known_licenses.keys()),values=state["licenses"],format_func=lambda l: f"{l} : {known_licenses[l]}",)if "other" in state["licenses"]:other_license = st.text_input("You selected 'other' type of license. Please enter a short hyphen-separated description:",value="my-license",)st.write(f"Registering other-{other_license} license")state["licenses"][state["licenses"].index("other")] = f"other-{other_license}"#257 unmodified lines2582592602612622632648 unmodified lines27327427527627727827917 unmodified lines297298299300301302303304305306307308309310311312257 unmodified linesstate["multilinguality"][state["multilinguality"].index("other")] = f"other-{other_multilinguality}"valid_values, invalid_values = list(), list()for langtag in state["language"]:try:lc.get(langtag)valid_values.append(langtag)8 unmodified lines"What languages are represented in the dataset? expected format is BCP47 tags separated for ';' e.g. 'en;fr'",value=";".join(valid_values),)state["language"] = langtags.strip().split(";") if langtags.strip() != "" else []#17 unmodified lines## LICENSE#state["license"] = multiselect(leftcol,"License","What license(s) is the dataset under?",valid_set=list(known_licenses.keys()),values=state["license"],format_func=lambda l: f"{l} : {known_licenses[l]}",)#
.github/workflows/deploy.ymlDeleted-37
apputils.py+2-2
tagging_app.py+7-14