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


πŸš€ Enjoy using the model! 🎯

Downloads last month
2
Safetensors
Model size
82.1M params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support