YAML Metadata Warning: The pipeline tag "text2text-generation" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other

Get Started

Usage

from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

model = AutoModelForSequenceClassification.from_pretrained("Savtale/User-Intention-Recognition")
tokenizer = AutoTokenizer.from_pretrained("Savtale/User-Intention-Recognition")

# User is talking with a chatbot
input_user_text = "Sounds good. I'm interested in trying the free trial. How do I sign up?"

# Tokenizing text
inputs = tokenizer(input_user_text.lower(), return_tensors="pt")

# Predict
with torch.no_grad():
    outputs = model(**inputs)
    logits = outputs.logits

# Prepare result
probabilities = torch.softmax(logits, dim=-1) # Top Match
predicted_class = int(torch.argmax(probabilities)) # Class no.
str_predicted_class = class_dict[str(predicted_class)] # Class String

print(f"Predicted User Intention: {str_predicted_class}") # Predicted User Intention: Request a Demo

Classes

class_dict = { "0": "Ask For Technical Support", "1": "Ask General Question", "2": "Start Conversation", "3": "Express Dissatisfaction", "4": "Request Product Information", "5": "Inquire About Pricing", "6": "Negotiate Price", "7": "Request Return or Refund", "8": "Provide Positive Feedback", "9": "Provide Negative Feedback", "10": "Seek Recommendation", "11": "Request Customization", "12": "Ask About Shipping and Delivery", "13": "Inquire About Warranty and Support", "14": "Express Interest in Upselling", "15": "Express Interest in Cross-selling", "16": "Request Urgent Assistance", "17": "Ask About Promotions and Discounts", "18": "Inquire About Loyalty Programs", "19": "Request a Callback", "20": "Ask About Payment Options", "21": "Express Uncertainty", "22": "Request Clarification", "23": "Confirm Understanding", "24": "End Conversation", "25": "Express Gratitude", "26": "Apologize", "27": "Complain About Customer Service", "28": "Request a Manager", "29": "Ask About Company Policies", "30": "Inquire About Job Opportunities", "31": "Ask About Corporate Social Responsibility", "32": "Express Interest in Investing", "33": "Cancellation", "34": "Ask About Return Policy", "35": "Inquire About Sustainability Practices", "36": "Request a Catalog", "37": "Ask About Brand History", "38": "Express Interest in Partnership", "39": "Inquire About Franchise Opportunities", "40": "Ask About Corporate Events", "41": "Express Interest in Volunteering", "42": "Request a Referral", "43": "Ask About Gift Cards", "44": "Inquire About Product Availability", "45": "Request a Personalized Recommendation", "46": "Ask About Order Status", "47": "Express Interest in a Webinar or Workshop", "48": "Request a Demo", "49": "Ask About Social Media Channels" }

Authors

  • Savta
Downloads last month
8
Safetensors
Model size
110M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for Savtale/User-Intention-Recognition

Finetuned
(5581)
this model