Model generates definitions of the word given context.
How to use model:
from transformers import pipeline
generator = pipeline("text2text-generation", model = 'clarin-knext/wnet-def-plt5large', use_auth_token=True)
generator("komik: Poszed艂em dzisiaj na kabaret i by艂 tam 艣mieszny komik.")
[{'generated_text': 'cz艂owiek , kt贸ry lubi 偶artowa膰 i roz艣miesza膰 innych . '}]
model = T5ForConditionalGeneration.from_pretrained("clarin-knext/wnet-def-plt5large", use_auth_token=True)
tokenizer = T5TokenizerFast.from_pretrained("clarin-knext/wnet-def-plt5large", use_auth_token=True)
input_ids = tokenizer("samoch贸d: po drodze jedzie samoch贸d", return_tensors="pt").input_ids
outputs = model.generate(input_ids)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
- Downloads last month
- 16
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.