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
- 93
Inference Providers
NEW
This model is not currently available via any of the supported third-party Inference Providers, and
the model is not deployed on the HF Inference API.