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
File size: 670 Bytes
4fa3363 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | """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()
|