dominguesm
commited on
Commit
•
52989b8
1
Parent(s):
d6e6d43
Update README.md
Browse files
README.md
CHANGED
@@ -3,20 +3,19 @@ language: pt
|
|
3 |
tags:
|
4 |
- seq2seq
|
5 |
- t5
|
6 |
-
- positive_perspectives
|
7 |
widget:
|
8 |
-
- text: "['
|
9 |
-
- text: "['
|
10 |
-
- text: "['
|
11 |
-
- text: "['
|
12 |
-
- text: "['
|
13 |
---
|
14 |
|
15 |
# Positive Perspectives with Portuguese Text Reframing
|
16 |
|
17 |
## Model description
|
18 |
|
19 |
-
This model is a [PTT5]
|
20 |
|
21 |
## How to use
|
22 |
|
@@ -28,17 +27,17 @@ The model uses one or more sentiment strategies concatenated with a sentence and
|
|
28 |
|
29 |
### Available sentiment strategies:
|
30 |
|
31 |
-
**
|
32 |
|
33 |
-
**
|
34 |
|
35 |
-
**
|
36 |
|
37 |
-
**
|
38 |
|
39 |
-
**
|
40 |
|
41 |
-
**
|
42 |
|
43 |
### Usage
|
44 |
|
@@ -47,7 +46,7 @@ from transformers import pipeline
|
|
47 |
|
48 |
pipe = pipeline('summarization', "dominguesm/positive-reframing-ptbr")
|
49 |
|
50 |
-
text = "['
|
51 |
|
52 |
pipe(text, max_length=1024)
|
53 |
|
|
|
3 |
tags:
|
4 |
- seq2seq
|
5 |
- t5
|
|
|
6 |
widget:
|
7 |
+
- text: "['growth', 'neutralizing']: Sempre estressado e pensando em um monte de coisas ao mesmo tempo, preciso levar uma de cada vez, sobrecarga estressada, necessidade de reclamar"
|
8 |
+
- text: "['growth', 'neutralizing', 'optimism']: Se eu não tiver um colapso mental antes do final do verão, será um milagre."
|
9 |
+
- text: "['impermanence']: Dirigindo para visitar a vovó no hospital e o meu filho que está doente."
|
10 |
+
- text: "['optimism']: Ótimo agora, como vou explicar isso para ela, ela está tão perto de mim que não posso perdê-la :'("
|
11 |
+
- text: "['growth', 'optimism']: sempre há algo que eu poderia estar fazendo. Eu geralmente escolho não fazer isso."
|
12 |
---
|
13 |
|
14 |
# Positive Perspectives with Portuguese Text Reframing
|
15 |
|
16 |
## Model description
|
17 |
|
18 |
+
This model is a [PTT5][https://huggingface.co/unicamp-dl/ptt5-base-portuguese-vocab] finetuned to sentiment transfer task, where the objective is to reverse the sentiment polarity of a text without contradicting the original meaning. Based on the paper [arXiv:2204.02952](https://arxiv.org/abs/2204.02952).
|
19 |
|
20 |
## How to use
|
21 |
|
|
|
27 |
|
28 |
### Available sentiment strategies:
|
29 |
|
30 |
+
**growth**: viewing a challenging event as an opportunity for the author to specifically grow or improve himself.
|
31 |
|
32 |
+
**impermanence**: Saying that bad things don't last forever, will get better soon, and/or that other people have had similar difficulties.
|
33 |
|
34 |
+
**neutralizing**: Replacing a negative word with a neutral word. For example, “This was a terrible day” becomes “This was a long day”.
|
35 |
|
36 |
+
**optimism**: Focusing on things about the situation itself, at that moment, that are good (not just predicting a better future).
|
37 |
|
38 |
+
**self_affirmation**: Talking about what strengths the author already has, or values he admires, such as love, courage, perseverance, etc.
|
39 |
|
40 |
+
**thankfulness**: Expressing gratitude or gratitude with keywords like appreciate, happy for it, grateful for, good thing, etc.
|
41 |
|
42 |
### Usage
|
43 |
|
|
|
46 |
|
47 |
pipe = pipeline('summarization', "dominguesm/positive-reframing-ptbr")
|
48 |
|
49 |
+
text = "['thankfulness', 'optimism']: Tenho tanta coisa para fazer antes de sair da cidade por uma semana no domingo."
|
50 |
|
51 |
pipe(text, max_length=1024)
|
52 |
|