Downloads · 30 days
12
3% of all-time downloads
sumitaryal/Nepali_Grammatical_Error_Detection_NepBERTa
Nepali_Grammatical_Error_Detection_NepBERTa is a text classification model from sumitaryal. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
This model is designed for the Nepali Grammatical Error Detection (GED) task. It utilizes the BERT-based NepBERTa model to identify grammatical errors in Nepali text.
Downloads · 30 days
12
3% of all-time downloads
All-time downloads
433
Public
Parameters
109M
438 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors438 MB · 100%
From the Hugging Face model README
This model is designed for the Nepali Grammatical Error Detection (GED) task. It utilizes the BERT-based NepBERTa model to identify grammatical errors in Nepali text.
Use the code below to get started with the model.
import torch
from transformers import BertForSequenceClassification, AutoTokenizer
model = BertForSequenceClassification.from_pretrained("sumitaryal/Nepali_Grammatical_Error_Detection_NepBERTa")
tokenizer = AutoTokenizer.from_pretrained("sumitaryal/Nepali_Grammatical_Error_Detection_NepBERTa", do_lower_case=False)
input_sentence = "रामले भात खायो ।"
inputs = tokenizer(input_sentence, return_tensors="pt")
with torch.no_grad():
logits = model(**inputs).logits
predicted_class_id = logits.argmax().item()
predicted_class = model.config.id2label[predicted_class_id]
print(f'The sentence "{input_sentence}" is "{predicted_class}"')