Edit model card

Model Card for Model ID

This model is used to classify the user-intent for the MybaseAI project, visit https://github.com/mybaseai-ai/mybaseai.

Model Details

Multiclass classifier on top of distilbert-base-uncased

Model Description

Classifies user intent of queries into categories including: 0: Keyword Search 1: Semantic Search 2: Direct Question Answering

  • Developed by: [MybaseAI]
  • License: [MIT]
  • Finetuned from model [optional]: [distilbert-base-uncased]

Model Sources [optional]

Uses

This model is intended to be used in the MybaseAI Question-Answering System

Bias, Risks, and Limitations

This model has a very small dataset maintained by MybaseAI. If interested, reach out to mybaseai@gmail.com.

Recommendations

This model is intended to be used in the MybaseAI (QA System)

How to Get Started with the Model

from transformers import AutoTokenizer
from transformers import TFDistilBertForSequenceClassification
import tensorflow as tf

model = TFDistilBertForSequenceClassification.from_pretrained("mybaseai/intent-model")
tokenizer = AutoTokenizer.from_pretrained("mybaseai/intent-model")

class_semantic_mapping = {
        0: "Keyword Search",
        1: "Semantic Search",
        2: "Question Answer"
    }

# Get user input
user_query = "How do I set up MybaseAI to run on my local environment?"

# Encode the user input
inputs = tokenizer(user_query, return_tensors="tf", truncation=True, padding=True)

# Get model predictions
predictions = model(inputs)[0]

# Get predicted class
predicted_class = tf.math.argmax(predictions, axis=-1)

print(f"Predicted class: {class_semantic_mapping[int(predicted_class)]}")
Downloads last month
1
Inference API
Unable to determine this model’s pipeline type. Check the docs .