Instructions to use SkillScreen/SkillScreen-2B-Package with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SkillScreen/SkillScreen-2B-Package with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="SkillScreen/SkillScreen-2B-Package")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForSequenceClassification processor = AutoProcessor.from_pretrained("SkillScreen/SkillScreen-2B-Package") model = AutoModelForSequenceClassification.from_pretrained("SkillScreen/SkillScreen-2B-Package", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download examples/local-inventory/scripts/inventory.py from SkillScreen/SkillScreen-2B-Package: direct link, hf CLI and curl.
- Browser
- Download file 670 Bytes
-
https://huggingface.co/SkillScreen/SkillScreen-2B-Package/resolve/main/examples/local-inventory/scripts/inventory.py
- Command line
-
hf download hf://SkillScreen/SkillScreen-2B-Package/examples/local-inventory/scripts/inventory.py
-
curl -L -o inventory.py https://huggingface.co/SkillScreen/SkillScreen-2B-Package/resolve/main/examples/local-inventory/scripts/inventory.py
670 Bytes
| """Count immediate file extensions in a directory explicitly selected by the user.""" | |
| import argparse | |
| from collections import Counter | |
| import json | |
| from pathlib import Path | |
| def main(): | |
| parser = argparse.ArgumentParser(description=__doc__) | |
| parser.add_argument('directory', type=Path) | |
| args = parser.parse_args() | |
| if not args.directory.is_dir(): | |
| parser.error('Choose an existing directory.') | |
| counts = Counter(path.suffix.lower() or '(none)' for path in args.directory.iterdir() | |
| if path.is_file() and not path.is_symlink()) | |
| print(json.dumps(dict(sorted(counts.items())), indent=2)) | |
| if __name__ == '__main__': | |
| main() | |