Edit model card

Base Model: google/flan-t5-large

A seq2seq event triggers tagger trained on the dataset: maven ere

Usage

Input:

triggers: I like this model and hate this sentence

Output:

like | hate
  • Python

Using .generate()

from transformers import GenerationConfig, T5ForConditionalGeneration, T5Tokenizer

model_name = "ahmeshaf/maven_ere_trigger_seq2seq"

model = T5ForConditionalGeneration.from_pretrained(model_name)
tokenizer = T5Tokenizer.from_pretrained(model_name)
generation_config = GenerationConfig.from_pretrained(model_name)

tokenized_inputs = tokenizer(["I like this model and hate this sentence ."], return_tensors="pt")
outputs = model.generate(**tokenized_inputs, generation_config=generation_config)

print(tokenizer.batch_decode(outputs, skip_special_tokens=True))

# ['like | hate']

Using pipeline

from transformers import pipeline
srl = pipeline("ahmeshaf/maven_ere_trigger_seq2seq")
print(srl(["I like this model and hate this sentence ."]))

# [{'generated_text': 'like | hate'}]
Downloads last month
5
Safetensors
Model size
783M params
Tensor type
F32
·
Inference Examples
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.