Downloads · 30 days
1
9% of all-time downloads
rafay-15/Roberta-InterestDetection
Roberta-InterestDetection is a machine learning model from rafay-15. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
bash pip install transformers python from transformers import AutoTokenizer, AutoModelForSequenceClassification import torch
Downloads · 30 days
1
9% of all-time downloads
All-time downloads
11
Public
Parameters
82.1M
328 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors328 MB · 98%
From the Hugging Face model README
# Interest Analysis Model 🎯
This is a fine-tuned version of `j-hartmann/emotion-english-distilroberta-base` for **intent analysis**, categorizing text into three classes:
✅ **Disinterested**
✅ **Neutral**
✅ **Interested**
It is useful for analyzing customer feedback, social media posts, and other text-based interactions to determine user intent.
---
## 🚀 Model Details
- **Base Model**: [j-hartmann/emotion-english-distilroberta-base](https://huggingface.co/j-hartmann/emotion-english-distilroberta-base)
- **Fine-Tuned For**: Intent analysis with **3 labels**
- **Dataset**: Custom dataset based on user-defined categories
- **Labels**:
- `0`: Disinterested
- `1`: Neutral
- `2`: Interested
---
## 📥 Installation
To use this model, install the `transformers` library:
```bash
pip install transformers
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# Load the model
model_name = "Rafay-15/InterestAnalysisModel" # Replace with your Hugging Face model name
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
# Define label mapping
id2label = {0: "disinterested", 1: "neutral", 2: "interested"}
def predict(text):
"""Predicts the intent category of the input text."""
inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True)
with torch.no_grad():
outputs = model(**inputs)
logits = outputs.logits
predicted_class = torch.argmax(logits, dim=1).item()
return id2label[predicted_class]
# Test Example
text = "I really love this product!"
print(f"Text: {text} -> Predicted Label: {predict(text)}")
| Text | Prediction |
|---|---|
| "I love this product!" | Interested ✅ |
| "I don’t really care about this." | Disinterested ❌ |
| "It's okay, I guess." | Neutral 😐 |
This model is released under the MIT License. You are free to use it for research and commercial purposes.
If you have improvements or suggestions, feel free to open an issue or contribute via GitHub.
🚀 Enjoy using the model! 🎯