Instructions to use DreamingRabbit/CPGen-difficulty-classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DreamingRabbit/CPGen-difficulty-classification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="DreamingRabbit/CPGen-difficulty-classification")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("DreamingRabbit/CPGen-difficulty-classification") model = AutoModelForSequenceClassification.from_pretrained("DreamingRabbit/CPGen-difficulty-classification", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| from huggingface_hub import HfApi | |
| api = HfApi() | |
| repo_id = "DreamingRabbit/CPGen-difficulty-classification" | |
| api.create_repo(repo_id, repo_type="model", exist_ok=True) | |
| api.upload_folder( | |
| folder_path="/volume/pt-coder/users/jyang02/codeforces_20251112/small_model/modernbert_difficulty_clf/checkpoint-402", | |
| repo_id=repo_id, | |
| repo_type="model", | |
| ignore_patterns=["*.log", "*.tmp", "__pycache__/*"], | |
| ) |