YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
**π README.md **
# 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
π Load the Model
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)}")
π Example Predictions
| Text | Prediction |
|---|---|
| "I love this product!" | Interested β |
| "I donβt really care about this." | Disinterested β |
| "It's okay, I guess." | Neutral π |
π License
This model is released under the MIT License. You are free to use it for research and commercial purposes.
π€ Contributing
If you have improvements or suggestions, feel free to open an issue or contribute via GitHub.
π Links
- π€ Model Page: Hugging Face
- π GitHub Repo: GitHub
π Enjoy using the model! π―
- Downloads last month
- 2
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support