Spaces:
Runtime error
Runtime error
Download utils/tag_utils.py from PageOrg/summaryapi: direct link, hf CLI and curl.
- Browser
- Download file 369 Bytes
-
https://huggingface.co/spaces/PageOrg/summaryapi/resolve/fddef45790dc11b94fb0f367f5e1ea4628ed07eb/utils/tag_utils.py
- Command line
-
hf download hf://spaces/PageOrg/summaryapi@fddef45790dc11b94fb0f367f5e1ea4628ed07eb/utils/tag_utils.py
-
curl -L -o tag_utils.py https://huggingface.co/spaces/PageOrg/summaryapi/resolve/fddef45790dc11b94fb0f367f5e1ea4628ed07eb/utils/tag_utils.py
369 Bytes
| from typing import List | |
| BlockTagNames = {'fifty'} | |
| BlockTagContents = ['voice'] | |
| def filter_tags(tags: List[str]) -> List[str]: | |
| tags = [tag.strip().lower().replace('|', '') for tag in tags] | |
| return [tag for tag in tags | |
| if len(tag) > 2 | |
| and tag not in BlockTagNames | |
| and not any(content in tag for content in BlockTagContents)] | |