RichardErkhov
commited on
Commit
•
ee35245
1
Parent(s):
af1c37c
uploaded readme
Browse files
README.md
ADDED
@@ -0,0 +1,311 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Quantization made by Richard Erkhov.
|
2 |
+
|
3 |
+
[Github](https://github.com/RichardErkhov)
|
4 |
+
|
5 |
+
[Discord](https://discord.gg/pvy7H8DZMG)
|
6 |
+
|
7 |
+
[Request more models](https://github.com/RichardErkhov/quant_request)
|
8 |
+
|
9 |
+
|
10 |
+
ClickbaitFighter-2B - GGUF
|
11 |
+
- Model creator: https://huggingface.co/Iker/
|
12 |
+
- Original model: https://huggingface.co/Iker/ClickbaitFighter-2B/
|
13 |
+
|
14 |
+
|
15 |
+
| Name | Quant method | Size |
|
16 |
+
| ---- | ---- | ---- |
|
17 |
+
| [ClickbaitFighter-2B.Q2_K.gguf](https://huggingface.co/RichardErkhov/Iker_-_ClickbaitFighter-2B-gguf/blob/main/ClickbaitFighter-2B.Q2_K.gguf) | Q2_K | 1.08GB |
|
18 |
+
| [ClickbaitFighter-2B.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/Iker_-_ClickbaitFighter-2B-gguf/blob/main/ClickbaitFighter-2B.IQ3_XS.gguf) | IQ3_XS | 1.16GB |
|
19 |
+
| [ClickbaitFighter-2B.IQ3_S.gguf](https://huggingface.co/RichardErkhov/Iker_-_ClickbaitFighter-2B-gguf/blob/main/ClickbaitFighter-2B.IQ3_S.gguf) | IQ3_S | 1.2GB |
|
20 |
+
| [ClickbaitFighter-2B.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/Iker_-_ClickbaitFighter-2B-gguf/blob/main/ClickbaitFighter-2B.Q3_K_S.gguf) | Q3_K_S | 1.2GB |
|
21 |
+
| [ClickbaitFighter-2B.IQ3_M.gguf](https://huggingface.co/RichardErkhov/Iker_-_ClickbaitFighter-2B-gguf/blob/main/ClickbaitFighter-2B.IQ3_M.gguf) | IQ3_M | 1.22GB |
|
22 |
+
| [ClickbaitFighter-2B.Q3_K.gguf](https://huggingface.co/RichardErkhov/Iker_-_ClickbaitFighter-2B-gguf/blob/main/ClickbaitFighter-2B.Q3_K.gguf) | Q3_K | 1.29GB |
|
23 |
+
| [ClickbaitFighter-2B.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/Iker_-_ClickbaitFighter-2B-gguf/blob/main/ClickbaitFighter-2B.Q3_K_M.gguf) | Q3_K_M | 1.29GB |
|
24 |
+
| [ClickbaitFighter-2B.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/Iker_-_ClickbaitFighter-2B-gguf/blob/main/ClickbaitFighter-2B.Q3_K_L.gguf) | Q3_K_L | 1.36GB |
|
25 |
+
| [ClickbaitFighter-2B.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/Iker_-_ClickbaitFighter-2B-gguf/blob/main/ClickbaitFighter-2B.IQ4_XS.gguf) | IQ4_XS | 1.4GB |
|
26 |
+
| [ClickbaitFighter-2B.Q4_0.gguf](https://huggingface.co/RichardErkhov/Iker_-_ClickbaitFighter-2B-gguf/blob/main/ClickbaitFighter-2B.Q4_0.gguf) | Q4_0 | 1.44GB |
|
27 |
+
| [ClickbaitFighter-2B.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/Iker_-_ClickbaitFighter-2B-gguf/blob/main/ClickbaitFighter-2B.IQ4_NL.gguf) | IQ4_NL | 1.45GB |
|
28 |
+
| [ClickbaitFighter-2B.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/Iker_-_ClickbaitFighter-2B-gguf/blob/main/ClickbaitFighter-2B.Q4_K_S.gguf) | Q4_K_S | 1.45GB |
|
29 |
+
| [ClickbaitFighter-2B.Q4_K.gguf](https://huggingface.co/RichardErkhov/Iker_-_ClickbaitFighter-2B-gguf/blob/main/ClickbaitFighter-2B.Q4_K.gguf) | Q4_K | 1.52GB |
|
30 |
+
| [ClickbaitFighter-2B.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/Iker_-_ClickbaitFighter-2B-gguf/blob/main/ClickbaitFighter-2B.Q4_K_M.gguf) | Q4_K_M | 1.52GB |
|
31 |
+
| [ClickbaitFighter-2B.Q4_1.gguf](https://huggingface.co/RichardErkhov/Iker_-_ClickbaitFighter-2B-gguf/blob/main/ClickbaitFighter-2B.Q4_1.gguf) | Q4_1 | 1.56GB |
|
32 |
+
| [ClickbaitFighter-2B.Q5_0.gguf](https://huggingface.co/RichardErkhov/Iker_-_ClickbaitFighter-2B-gguf/blob/main/ClickbaitFighter-2B.Q5_0.gguf) | Q5_0 | 1.68GB |
|
33 |
+
| [ClickbaitFighter-2B.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/Iker_-_ClickbaitFighter-2B-gguf/blob/main/ClickbaitFighter-2B.Q5_K_S.gguf) | Q5_K_S | 1.68GB |
|
34 |
+
| [ClickbaitFighter-2B.Q5_K.gguf](https://huggingface.co/RichardErkhov/Iker_-_ClickbaitFighter-2B-gguf/blob/main/ClickbaitFighter-2B.Q5_K.gguf) | Q5_K | 1.71GB |
|
35 |
+
| [ClickbaitFighter-2B.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/Iker_-_ClickbaitFighter-2B-gguf/blob/main/ClickbaitFighter-2B.Q5_K_M.gguf) | Q5_K_M | 1.71GB |
|
36 |
+
| [ClickbaitFighter-2B.Q5_1.gguf](https://huggingface.co/RichardErkhov/Iker_-_ClickbaitFighter-2B-gguf/blob/main/ClickbaitFighter-2B.Q5_1.gguf) | Q5_1 | 1.79GB |
|
37 |
+
| [ClickbaitFighter-2B.Q6_K.gguf](https://huggingface.co/RichardErkhov/Iker_-_ClickbaitFighter-2B-gguf/blob/main/ClickbaitFighter-2B.Q6_K.gguf) | Q6_K | 1.92GB |
|
38 |
+
| [ClickbaitFighter-2B.Q8_0.gguf](https://huggingface.co/RichardErkhov/Iker_-_ClickbaitFighter-2B-gguf/blob/main/ClickbaitFighter-2B.Q8_0.gguf) | Q8_0 | 2.49GB |
|
39 |
+
|
40 |
+
|
41 |
+
|
42 |
+
|
43 |
+
Original model description:
|
44 |
+
---
|
45 |
+
---
|
46 |
+
license: cc-by-nc-sa-4.0
|
47 |
+
datasets:
|
48 |
+
- Iker/NoticIA
|
49 |
+
language:
|
50 |
+
- es
|
51 |
+
metrics:
|
52 |
+
- rouge
|
53 |
+
library_name: transformers
|
54 |
+
pipeline_tag: text-generation
|
55 |
+
base_model: google/gemma-2b-it
|
56 |
+
tags:
|
57 |
+
- clickbait
|
58 |
+
- noticia
|
59 |
+
- spanish
|
60 |
+
- summary
|
61 |
+
- summarization
|
62 |
+
widget:
|
63 |
+
- example_title: Summary
|
64 |
+
messages:
|
65 |
+
- role: user
|
66 |
+
content: "Ahora eres una Inteligencia Artificial experta en desmontar titulares
|
67 |
+
sensacionalistas o clickbait. Tu tarea consiste en analizar noticias
|
68 |
+
con titulares sensacionalistas y generar un resumen de una sola frase
|
69 |
+
que revele la verdad detrás del titular.\\nEste es el titular de la
|
70 |
+
noticia: Le compra un abrigo a su abuela de 97 años y la reacción de
|
71 |
+
esta es una fantasía\\nEl titular plantea una pregunta o proporciona
|
72 |
+
información incompleta. Debes buscar en el cuerpo de la noticia una
|
73 |
+
frase que responda lo que se sugiere en el título. Siempre que puedas
|
74 |
+
cita el texto original, especialmente si se trata de una frase que
|
75 |
+
alguien ha dicho. Si citas una frase que alguien ha dicho, usa
|
76 |
+
comillas para indicar que es una cita. Usa siempre las mínimas
|
77 |
+
palabras posibles. No es necesario que la respuesta sea una oración
|
78 |
+
completa. Puede ser sólo el foco de la pregunta. Recuerda responder
|
79 |
+
siempre en Español.\\nEste es el cuerpo de la noticia:\\nLa usuaria de
|
80 |
+
X @Kokreta1 ha relatado la conversación que ha tenido con su abuela de
|
81 |
+
97 años cuando le ha dado el abrigo que le ha comprado para su
|
82 |
+
cumpleaños.\\nTeniendo en cuenta la avanzada edad de la señora, la
|
83 |
+
tuitera le ha regalado una prenda acorde a sus años, algo con lo que
|
84 |
+
su yaya no ha estado de acuerdo.\\nEl abrigo es de vieja, ha opinado
|
85 |
+
la mujer cuando lo ha visto. Os juro que soy muy fan. Mañana vamos las
|
86 |
+
dos (a por otro). Eso sí, la voy a llevar al Bershka, ha asegurado
|
87 |
+
entre risas la joven.\\nSegún la propia cadena de ropa, la cual
|
88 |
+
pertenece a Inditex, su público se caracteriza por ser jóvenes
|
89 |
+
atrevidos, conocedores de las últimas tendencias e interesados en la
|
90 |
+
música, las redes sociales y las nuevas tecnologías, por lo que la
|
91 |
+
gente mayor no suele llevar este estilo.\\nLa inusual personalidad de
|
92 |
+
la señora ha encantado a los usuarios de la red. Es por eso que el
|
93 |
+
relato ha acumulado más de 1.000 me gusta y cerca de 100 retuits,
|
94 |
+
además de una multitud de comentarios.\\n"
|
95 |
+
---
|
96 |
+
|
97 |
+
<table>
|
98 |
+
<tr>
|
99 |
+
<td style="width:100%"><img src="https://github.com/ikergarcia1996/NoticIA/blob/main/assets/head.png?raw=true" align="right" width="100%"> </td>
|
100 |
+
</tr>
|
101 |
+
</table>
|
102 |
+
|
103 |
+
A model finetuned with the [NoticIA Dataset](https://huggingface.co/datasets/Iker/NoticIA). This model can generate summaries of clickbait headlines
|
104 |
+
|
105 |
+
If you are looking for a larger model, with better performance, check out [ClickbaitFighter-10B](https://huggingface.co/Iker/ClickbaitFighter-10B).
|
106 |
+
|
107 |
+
- 📖 Paper: [NoticIA: A Clickbait Article Summarization Dataset in Spanish](https://arxiv.org/abs/2404.07611)
|
108 |
+
- 📓 NoticIA Dataset: [https://huggingface.co/datasets/Iker/NoticIA](https://huggingface.co/datasets/Iker/NoticIA)
|
109 |
+
- 💻 Baseline Code: [https://github.com/ikergarcia1996/NoticIA](https://github.com/ikergarcia1996/NoticIA)
|
110 |
+
- 🤖 Pre Trained Models [https://huggingface.co/collections/Iker/noticia-and-clickbaitfighter-65fdb2f80c34d7c063d3e48e](https://huggingface.co/collections/Iker/noticia-and-clickbaitfighter-65fdb2f80c34d7c063d3e48e)
|
111 |
+
- 🔌 Online Demo: [https://iker-clickbaitfighter.hf.space/](https://iker-clickbaitfighter.hf.space/)
|
112 |
+
|
113 |
+
# Open Source Models
|
114 |
+
<table border="1" cellspacing="0" cellpadding="5">
|
115 |
+
<thead>
|
116 |
+
<tr>
|
117 |
+
<th></th>
|
118 |
+
<th><a href="https://huggingface.co/Iker/ClickbaitFighter-2B">Iker/ClickbaitFighter-2B</a></th>
|
119 |
+
<th><a href="https://huggingface.co/Iker/ClickbaitFighter-7B">Iker/ClickbaitFighter-7B</a></th>
|
120 |
+
<th><a href="https://huggingface.co/Iker/ClickbaitFighter-10B">Iker/ClickbaitFighter-10B</a></th>
|
121 |
+
</tr>
|
122 |
+
</thead>
|
123 |
+
<tbody>
|
124 |
+
<tr>
|
125 |
+
<td>Param. no.</td>
|
126 |
+
<td>2B</td>
|
127 |
+
<td>7B</td>
|
128 |
+
<td>10M</td>
|
129 |
+
</tr>
|
130 |
+
<tr>
|
131 |
+
<td>ROUGE</td>
|
132 |
+
<td>36.26</td>
|
133 |
+
<td>49.81</td>
|
134 |
+
<td>52.01</td>
|
135 |
+
</tr>
|
136 |
+
<tr>
|
137 |
+
</tbody>
|
138 |
+
</table>
|
139 |
+
|
140 |
+
# Evaluation Results
|
141 |
+
<table>
|
142 |
+
<tr>
|
143 |
+
<td style="width:100%"><img src="https://github.com/ikergarcia1996/NoticIA/raw/main/results/Results.png" align="right" width="100%"> </td>
|
144 |
+
</tr>
|
145 |
+
</table>
|
146 |
+
|
147 |
+
|
148 |
+
# Usage example:
|
149 |
+
|
150 |
+
## Summarize a web article
|
151 |
+
```python
|
152 |
+
import torch # pip install torch
|
153 |
+
from newspaper import Article #pip3 install newspaper3k
|
154 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig # pip install transformers
|
155 |
+
|
156 |
+
article_url ="https://www.huffingtonpost.es/virales/le-compra-abrigo-abuela-97nos-reaccion-fantasia.html"
|
157 |
+
article = Article(article_url)
|
158 |
+
article.download()
|
159 |
+
article.parse()
|
160 |
+
headline=article.title
|
161 |
+
body = article.text
|
162 |
+
|
163 |
+
def prompt(
|
164 |
+
headline: str,
|
165 |
+
body: str,
|
166 |
+
) -> str:
|
167 |
+
"""
|
168 |
+
Generate the prompt for the model.
|
169 |
+
|
170 |
+
Args:
|
171 |
+
headline (`str`):
|
172 |
+
The headline of the article.
|
173 |
+
body (`str`):
|
174 |
+
The body of the article.
|
175 |
+
Returns:
|
176 |
+
`str`: The formatted prompt.
|
177 |
+
"""
|
178 |
+
|
179 |
+
return (
|
180 |
+
f"Ahora eres una Inteligencia Artificial experta en desmontar titulares sensacionalistas o clickbait. "
|
181 |
+
f"Tu tarea consiste en analizar noticias con titulares sensacionalistas y "
|
182 |
+
f"generar un resumen de una sola frase que revele la verdad detrás del titular.\n"
|
183 |
+
f"Este es el titular de la noticia: {headline}\n"
|
184 |
+
f"El titular plantea una pregunta o proporciona información incompleta. "
|
185 |
+
f"Debes buscar en el cuerpo de la noticia una frase que responda lo que se sugiere en el título. "
|
186 |
+
f"Siempre que puedas cita el texto original, especialmente si se trata de una frase que alguien ha dicho. "
|
187 |
+
f"Si citas una frase que alguien ha dicho, usa comillas para indicar que es una cita. "
|
188 |
+
f"Usa siempre las mínimas palabras posibles. No es necesario que la respuesta sea una oración completa. "
|
189 |
+
f"Puede ser sólo el foco de la pregunta. "
|
190 |
+
f"Recuerda responder siempre en Español.\n"
|
191 |
+
f"Este es el cuerpo de la noticia:\n"
|
192 |
+
f"{body}\n"
|
193 |
+
)
|
194 |
+
|
195 |
+
prompt = prompt(headline=headline, body=body)
|
196 |
+
|
197 |
+
tokenizer = AutoTokenizer.from_pretrained("Iker/ClickbaitFighter-2B")
|
198 |
+
model = AutoModelForCausalLM.from_pretrained(
|
199 |
+
"Iker/ClickbaitFighter-2B", torch_dtype=torch.bfloat16, device_map="auto"
|
200 |
+
)
|
201 |
+
|
202 |
+
formatted_prompt = tokenizer.apply_chat_template(
|
203 |
+
[{"role": "user", "content": prompt}],
|
204 |
+
tokenize=False,
|
205 |
+
add_generation_prompt=True,
|
206 |
+
)
|
207 |
+
|
208 |
+
model_inputs = tokenizer(
|
209 |
+
[formatted_prompt], return_tensors="pt", add_special_tokens=False
|
210 |
+
)
|
211 |
+
|
212 |
+
model_output = model.generate(**model_inputs.to(model.device), generation_config=GenerationConfig(
|
213 |
+
max_new_tokens=32,
|
214 |
+
min_new_tokens=1,
|
215 |
+
do_sample=False,
|
216 |
+
num_beams=1,
|
217 |
+
use_cache=True
|
218 |
+
))
|
219 |
+
|
220 |
+
summary = tokenizer.batch_decode(model_output,skip_special_tokens=True)[0]
|
221 |
+
|
222 |
+
print(summary.strip().split("\n")[-1]) # Get only the summary, without the prompt.
|
223 |
+
```
|
224 |
+
|
225 |
+
## Run inference in the NoticIA dataset
|
226 |
+
```python
|
227 |
+
import torch # pip install torch
|
228 |
+
from datasets import load_dataset # pip install datasets
|
229 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig # pip install transformers
|
230 |
+
|
231 |
+
dataset = load_dataset("Iker/NoticIA")
|
232 |
+
example = dataset["test"][0]
|
233 |
+
headline = example["web_headline"]
|
234 |
+
body = example["web_text"]
|
235 |
+
|
236 |
+
def prompt(
|
237 |
+
headline: str,
|
238 |
+
body: str,
|
239 |
+
) -> str:
|
240 |
+
"""
|
241 |
+
Generate the prompt for the model.
|
242 |
+
|
243 |
+
Args:
|
244 |
+
headline (`str`):
|
245 |
+
The headline of the article.
|
246 |
+
body (`str`):
|
247 |
+
The body of the article.
|
248 |
+
Returns:
|
249 |
+
`str`: The formatted prompt.
|
250 |
+
"""
|
251 |
+
|
252 |
+
return (
|
253 |
+
f"Ahora eres una Inteligencia Artificial experta en desmontar titulares sensacionalistas o clickbait. "
|
254 |
+
f"Tu tarea consiste en analizar noticias con titulares sensacionalistas y "
|
255 |
+
f"generar un resumen de una sola frase que revele la verdad detrás del titular.\n"
|
256 |
+
f"Este es el titular de la noticia: {headline}\n"
|
257 |
+
f"El titular plantea una pregunta o proporciona información incompleta. "
|
258 |
+
f"Debes buscar en el cuerpo de la noticia una frase que responda lo que se sugiere en el título. "
|
259 |
+
f"Siempre que puedas cita el texto original, especialmente si se trata de una frase que alguien ha dicho. "
|
260 |
+
f"Si citas una frase que alguien ha dicho, usa comillas para indicar que es una cita. "
|
261 |
+
f"Usa siempre las mínimas palabras posibles. No es necesario que la respuesta sea una oración completa. "
|
262 |
+
f"Puede ser sólo el foco de la pregunta. "
|
263 |
+
f"Recuerda responder siempre en Español.\n"
|
264 |
+
f"Este es el cuerpo de la noticia:\n"
|
265 |
+
f"{body}\n"
|
266 |
+
)
|
267 |
+
|
268 |
+
prompt = prompt(headline=headline, body=body)
|
269 |
+
|
270 |
+
tokenizer = AutoTokenizer.from_pretrained("Iker/ClickbaitFighter-2B")
|
271 |
+
model = AutoModelForCausalLM.from_pretrained(
|
272 |
+
"Iker/ClickbaitFighter-2B", torch_dtype=torch.bfloat16, device_map="auto"
|
273 |
+
)
|
274 |
+
|
275 |
+
formatted_prompt = tokenizer.apply_chat_template(
|
276 |
+
[{"role": "user", "content": prompt}],
|
277 |
+
tokenize=False,
|
278 |
+
add_generation_prompt=True,
|
279 |
+
)
|
280 |
+
|
281 |
+
model_inputs = tokenizer(
|
282 |
+
[formatted_prompt], return_tensors="pt", add_special_tokens=False
|
283 |
+
)
|
284 |
+
|
285 |
+
model_output = model.generate(**model_inputs.to(model.device), generation_config=GenerationConfig(
|
286 |
+
max_new_tokens=32,
|
287 |
+
min_new_tokens=1,
|
288 |
+
do_sample=False,
|
289 |
+
num_beams=1,
|
290 |
+
use_cache=True
|
291 |
+
))
|
292 |
+
|
293 |
+
summary = tokenizer.batch_decode(model_output,skip_special_tokens=True)[0]
|
294 |
+
|
295 |
+
print(summary.strip().split("\n")[-1]) # Get only the summary, without the prompt.
|
296 |
+
```
|
297 |
+
|
298 |
+
|
299 |
+
# Citation
|
300 |
+
|
301 |
+
```bittext
|
302 |
+
@misc{noticia2024,
|
303 |
+
title={NoticIA: A Clickbait Article Summarization Dataset in Spanish},
|
304 |
+
author={Iker García-Ferrero and Begoña Altuna},
|
305 |
+
year={2024},
|
306 |
+
eprint={2404.07611},
|
307 |
+
archivePrefix={arXiv},
|
308 |
+
primaryClass={cs.CL}
|
309 |
+
}
|
310 |
+
```
|
311 |
+
|