Views
No views yet
airesearch/wangchanberta-base-att-spm-uncasedwttw/modchelin_thainer-base-model"ต้มยำกุ้งอร่อยมาก แต่บริการช้า"ต้มยำกุ้ง: FOODบริการ: SERVICEFOOD entities in unrelated contexts1from transformers import AutoTokenizer, AutoModelForTokenClassification
2from transformers import pipeline
3
4model_name = "wttw/modchelin_thainer-base-model"
5
6tokenizer = AutoTokenizer.from_pretrained(model_name)
7model = AutoModelForTokenClassification.from_pretrained(model_name)
8
9ner_pipeline = pipeline("ner", model=model, tokenizer=tokenizer, aggregation_strategy="simple")
10
11example = "ต้มยำกุ้งอร่อยมาก แต่บริการช้า"
12entities = ner_pipeline(example)
13
14print(entities)