Views
No views yet
bert-base-uncased model finetuned on a custom dataset to detect Country and City names from a given sentence.City and Country information. We also did some extra preprocessing to remove false labels.OTHER, CITY and COUNTRYfrom transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("ml6team/bert-base-uncased-city-country-ner")
model = AutoModelForTokenClassification.from_pretrained("ml6team/bert-base-uncased-city-country-ner")
from transformers import pipeline
nlp = pipeline('ner', model=model, tokenizer=tokenizer, aggregation_strategy="simple")
nlp("My name is Kermit and I live in London.")