Instructions to use AnanthanarayananSeetharaman/osa-custom-ner-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AnanthanarayananSeetharaman/osa-custom-ner-model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="AnanthanarayananSeetharaman/osa-custom-ner-model")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("AnanthanarayananSeetharaman/osa-custom-ner-model") model = AutoModelForTokenClassification.from_pretrained("AnanthanarayananSeetharaman/osa-custom-ner-model") - Notebooks
- Google Colab
- Kaggle
My Custom NER Model
This is a custom Named Entity Recognition (NER) model fine-tuned on domain-specific data using a BERT-based architecture.
Entities
The model is trained to recognize the following entities:
FACT: Facts related to sales, revenue, etc.PRDC_CHAR: Product characteristics like product names.MRKT_CHAR: Market details like regions.
Example Usage
from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
# Load the model and tokenizer
model = AutoModelForTokenClassification.from_pretrained("AnanthanarayananSeetharaman/osa-custom-ner-model")
tokenizer = AutoTokenizer.from_pretrained("AnanthanarayananSeetharaman/osa-custom-ner-model")
# Create a pipeline
ner_pipeline = pipeline("ner", model=model, tokenizer=tokenizer)
# Test the pipeline
text = "The SALES of BEER and WINE in TTL US is increasing."
entities = ner_pipeline(text)
print(entities)
- Downloads last month
- 4