Hugging Face model: tahamueed23/roman-urdu-sentiment-analysis
Author: tahamueed23
Created: 2026-02-11 16:09:11
Last modified: 2026-07-12 08:01:42
Pipeline: text-classification
Library: transformers
Likes: 0 | Downloads: 17
Tags: transformers, safetensors, xlm-roberta, text-classification, sentiment-analysis, roman-urdu, urdu, roberta, pytorch, nlp, hindi-urdu, south-asian-languages, ur, en, dataset:custom-roman-urdu-feedback, base_model:cardiffnlp/twitter-roberta-base-sentiment-latest, base_model:finetune:cardiffnlp/twitter-roberta-base-sentiment-latest, license:mit, model-index, co2_eq_emissions, text-embeddings-inference, endpoints_compatible, region:us
Base model relation: finetune
Base models: id: cardiffnlp/twitter-roberta-base-sentiment-latest
Card metadata:
language: ur, en
tags: sentiment-analysis, roman-urdu, urdu, text-classification, roberta, transformers, pytorch, nlp, hindi-urdu, south-asian-languages
datasets: custom-roman-urdu-feedback
license: mit
library_name: transformers
pipeline_tag: text-classification
metrics: accuracy, f1, precision, recall
base_model: cardiffnlp/twitter-roberta-base-sentiment-latest
inference: parameters: max_length: 128
padding: yes
truncation: yes
return_tensors: pt
temperature: 1
model_usage: pipeline: code: from transformers import pipeline
classifier = pipeline("sentiment-analysis", model="tahamued23/roman-urdu-sentiment-analysis")
result = classifier("bahut acha service hai")

manual: code: from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model_name = "tahamued23/roman-urdu-sentiment-analysis"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
inputs = tokenizer("bahut acha service hai", return_tensors="pt", padding=True, truncation=True, max_length=128)
with torch.no_grad():
    outputs = model(**inputs)
    predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
    predicted_class = torch.argmax(predictions, dim=1).item()

batch: code: texts = ["bahut acha hai", "bekar hai", "theek hai"]
results = classifier(texts)

classes: 0: Negative
1: Neutral
2: Positive
example_results: text: bahut acha service hai
sentiment: Positive
confidence: 0.9853, text: bilkul bekar experience tha mera
sentiment: Negative
confidence: 0.9451, text: theek hai kuch khas nahi tha
sentiment: Neutral
confidence: 0.9079
co2_eq_emissions: emissions: 0.85
source: Hugging Face Calculator
training_type: fine-tuning
hardware_used: NVIDIA Tesla T4