ai4bharat/naamapadam
Viewer โข Updated โข 5.79M โข 1.17k โข 12
How to use Red-8/Gujarati_NER-1 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("token-classification", model="Red-8/Gujarati_NER-1") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("Red-8/Gujarati_NER-1")
model = AutoModelForTokenClassification.from_pretrained("Red-8/Gujarati_NER-1", device_map="auto")