Downloads · 30 days
17
4% of all-time downloads
mahesh27/div-class-roberta
div-class-roberta is a text classification model from mahesh27. 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 is the best-performing classfier in Divinity classification of Rig Vedic verses.
Downloads · 30 days
17
4% of all-time downloads
All-time downloads
471
Public
Repo size
812 MB
Likes
0
Public
Click a slice to open those files.
.bin406 MB · 100%
From the Hugging Face model README
This is the best-performing classfier in Divinity classification of Rig Vedic verses.
Sample usage:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("mahesh27/div-class-roberta")
model = AutoModelForSequenceClassification.from_pretrained("mahesh27/div-class-roberta", device_map="auto")
text = "ahim ahann sindhum pariśiśriyānam valam abhinad yataḥ sindhavo akṣaran prati vatsam na dhenavaḥ"
### "Killed the snake lying in the river Indus, broke the cave entrance whence flowed the rivers like cows towards a calf."
inputs = tokenizer(text, return_tensors='pt')["input_ids"].to(model.device)
model.eval()
pred = model(input_ids= inputs)
prediction = int(pred['logits'].argmax(dim=-1)[0])
print(model.config.id2label[prediction])
> 'indraḥ'
Citation:
@inproceedings{mahesh-bhattacharya-2023-creation,
title = "Creation of a Digital Rig {V}edic Index (Anukramani) for Computational Linguistic Tasks",
author = "Akavarapu, V.S.D.S.Mahesh and
Bhattacharya, Arnab",
editor = "Kulkarni, Amba and
Hellwig, Oliver",
booktitle = "Proceedings of the Computational {S}anskrit {\&} Digital Humanities: Selected papers presented at the 18th World {S}anskrit Conference",
month = jan,
year = "2023",
address = "Canberra, Australia (Online mode)",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2023.wsc-csdh.6/",
pages = "89--96"
}