Spaces:
Sleeping
Sleeping
from transformers import TextClassificationPipeline | |
class PipelinePreparer: | |
def prepare_pipeline(tokenizer, model): | |
"""Create text classification pipeline""" | |
return TextClassificationPipeline( | |
tokenizer=tokenizer, | |
model=model, | |
return_all_scores=True | |
) |