Run this model with HF Jobs
Run zachz/code-review-sentiment on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/zachz/code-review-sentiment. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/zachz/code-review-sentiment on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use zachz/code-review-sentiment with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use zachz/code-review-sentiment with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("zachz/code-review-sentiment", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
Code Review Sentiment Classifier
A lightweight sklearn-based classifier for code review comments. Classifies review feedback as positive, neutral, or negative.
Model Details
- Type: TF-IDF + Logistic Regression pipeline
- Task: 3-class text classification
- Framework: scikit-learn
- Labels: negative (0), neutral (1), positive (2)
Usage
import pickle
with open("model.pkl", "rb") as f:
model = pickle.load(f)
review = "Great implementation, clean code!"
label = model.predict([review])[0] # 0=negative, 1=neutral, 2=positive
proba = model.predict_proba([review])[0]
Training Data
30 code review comments (10 per class) covering:
- Positive: Praise, LGTM, good patterns
- Neutral: Suggestions, minor nits, questions
- Negative: Bugs, security issues, performance problems
Limitations
- Small training set
- English only
- Focused on software engineering domain
License
MIT
- Downloads last month
- -