dominguesm/positive-reframing-en
121
Positive Perspectives with English Text Reframing
Model description
This model is a T5-base adjusted to the sentiment transfer task, where the objective is to reverse the sentiment polarity of a text without contradicting the original meaning. Positive reframing induces a complementary positive viewpoint (e.g. glass-half-full) escaping negative patterns. Based on the article arXiv:2204.02952.
How to use
The model uses one or more sentiment strategies concatenated with a sentence and will generate a sentence with the applied sentiment output. The maximum string length is 1024 tokens. Entries must be organized in the following format:
Input:
['growth']: totally fed up with this bid now! :-( haven't even thought about my presentation yet :-(Available sentiment strategies:
Usage
from transformers import pipeline
pipe = pipeline('summarization', "dominguesm/positive-reframing-en")
text = "['growth']: totally fed up with this bid now! :-( haven't even thought about my presentation yet :-("
pipe(text, max_length=1024)
Output:
# I haven't thought about my presentation yet, but I'm going to work hard to improve #my presentation, and I'll be better soon.