Downloads · 30 days
174
13% of all-time downloads
cu-kairos/propbank_srl_seq2seq_t5_small
propbank_srl_seq2seq_t5_small is a machine learning model from cu-kairos. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
Downloads · 30 days
174
13% of all-time downloads
All-time downloads
1.3K
Public
Parameters
77M
309 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors308 MB · 99%
From the Hugging Face model README
from transformers import GenerationConfig, T5ForConditionalGeneration, T5Tokenizer
model_name = "cu-kairos/propbank_srl_seq2seq_t5_small"
model = T5ForConditionalGeneration.from_pretrained(model_name)
tokenizer = T5Tokenizer.from_pretrained(model_name)
generation_config = GenerationConfig.from_pretrained(model_name)
tokenized_inputs = tokenizer(["SRL for [put]: That fund was [put] together by Blackstone Group ."], return_tensors="pt")
outputs = model.generate(**tokenized_inputs, generation_config=generation_config)
print(tokenizer.batch_decode(outputs, skip_special_tokens=True))
# ['ARG-1: That fund | ARG-2: together | ARG-0: by Blackstone Group ']
from transformers import pipeline
srl = pipeline("cu-kairos/propbank_srl_seq2seq_t5_small")
print(srl(["SRL for [put]: That fund was [put] together by Blackstone Group ."]))
# [{'generated_text': 'ARG-1: That fund | ARG-2: together | ARG-0: by Blackstone Group '}]