baLLseM / model /pos_tagging.py
hqms's picture
initial commit
8578816
raw
history blame contribute delete
418 Bytes
from model.model import Model
class POSTagging(Model):
def __init__(self) -> None:
self.model_name = None
self.tasks = "pos-tagging"
self.load_model(model_name="w11wo/indonesian-roberta-base-posp-tagger", tasks=self.tasks)
def predict(self, sentences):
outputs = super().predict(sentences, self.tasks)
return {"result": outputs}
pos_tagging = POSTagging()