Skip to content

Commit 9b27cb1

Browse files
committed
Replaced depricated attribute of pipeline from all instances
1 parent 7c65d55 commit 9b27cb1

27 files changed

Lines changed: 59 additions & 103 deletions

File tree

chapters/de/chapter1/3.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,7 @@ Bei der automatischen Textzusammenfassung (engl. Summarization) geht es darum, e
249249
from transformers import pipeline
250250

251251
summarizer = pipeline("summarization")
252-
summarizer(
253-
"""
252+
summarizer("""
254253
America has changed dramatically during recent years. Not only has the number of
255254
graduates in traditional engineering disciplines such as mechanical, civil,
256255
electrical, chemical, and aeronautical engineering declined, but in most of
@@ -269,8 +268,7 @@ summarizer(
269268
Other industrial countries at minimum maintain their output, while America
270269
suffers an increasingly serious decline in the number of engineering graduates
271270
and a lack of well-educated engineers.
272-
"""
273-
)
271+
""")
274272
```
275273

276274
```python out

chapters/en/chapter1/3.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,7 @@ Summarization is the task of reducing a text into a shorter text while keeping a
269269
from transformers import pipeline
270270

271271
summarizer = pipeline("summarization")
272-
summarizer(
273-
"""
272+
summarizer("""
274273
America has changed dramatically during recent years. Not only has the number of
275274
graduates in traditional engineering disciplines such as mechanical, civil,
276275
electrical, chemical, and aeronautical engineering declined, but in most of
@@ -289,8 +288,7 @@ summarizer(
289288
Other industrial countries at minimum maintain their output, while America
290289
suffers an increasingly serious decline in the number of engineering graduates
291290
and a lack of well-educated engineers.
292-
"""
293-
)
291+
""")
294292
```
295293

296294
```python out

chapters/en/chapter9/7.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,10 @@ def flip_text(x):
4242
demo = gr.Blocks()
4343

4444
with demo:
45-
gr.Markdown(
46-
"""
45+
gr.Markdown("""
4746
# Flip Text!
4847
Start typing below to see the output.
49-
"""
50-
)
48+
""")
5149
input = gr.Textbox(placeholder="Flip this text")
5250
output = gr.Textbox()
5351

chapters/es/chapter1/3.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,7 @@ Resumir es la tarea de reducir un texto en uno más corto, conservando todos (o
249249
from transformers import pipeline
250250

251251
summarizer = pipeline("summarization")
252-
summarizer(
253-
"""
252+
summarizer("""
254253
America has changed dramatically during recent years. Not only has the number of
255254
graduates in traditional engineering disciplines such as mechanical, civil,
256255
electrical, chemical, and aeronautical engineering declined, but in most of
@@ -269,8 +268,7 @@ summarizer(
269268
Other industrial countries at minimum maintain their output, while America
270269
suffers an increasingly serious decline in the number of engineering graduates
271270
and a lack of well-educated engineers.
272-
"""
273-
)
271+
""")
274272
```
275273

276274
```python out

chapters/fr/chapter1/3.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,7 @@ Le résumé est une tâche de réduction d'un texte en un texte plus court, tout
276276
from transformers import pipeline
277277

278278
summarizer = pipeline("summarization")
279-
summarizer(
280-
"""
279+
summarizer("""
281280
America has changed dramatically during recent years. Not only has the number of
282281
graduates in traditional engineering disciplines such as mechanical, civil,
283282
electrical, chemical, and aeronautical engineering declined, but in most of
@@ -296,8 +295,7 @@ summarizer(
296295
Other industrial countries at minimum maintain their output, while America
297296
suffers an increasingly serious decline in the number of engineering graduates
298297
and a lack of well-educated engineers.
299-
"""
300-
)
298+
""")
301299

302300
"""
303301
L'Amérique a changé de façon spectaculaire au cours des dernières années. Non seulement le nombre de

chapters/fr/chapter9/7.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,10 @@ def flip_text(x):
4444
demo = gr.Blocks()
4545

4646
with demo:
47-
gr.Markdown(
48-
"""
47+
gr.Markdown("""
4948
# Flip Text!
5049
Start typing below to see the output.
51-
"""
52-
)
50+
""")
5351
input = gr.Textbox(placeholder="Flip this text")
5452
output = gr.Textbox()
5553

chapters/hi/chapter1/3.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,7 @@ question_answerer(
263263
from transformers import pipeline
264264

265265
summarizer = pipeline("summarization")
266-
summarizer(
267-
"""
266+
summarizer("""
268267
America has changed dramatically during recent years. Not only has the number of
269268
graduates in traditional engineering disciplines such as mechanical, civil,
270269
electrical, chemical, and aeronautical engineering declined, but in most of
@@ -283,8 +282,7 @@ summarizer(
283282
Other industrial countries at minimum maintain their output, while America
284283
suffers an increasingly serious decline in the number of engineering graduates
285284
and a lack of well-educated engineers.
286-
"""
287-
)
285+
""")
288286
```
289287

290288
```python out

chapters/it/chapter1/3.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,7 @@ Quello del riassunto è un compito che trasforma un testo in un testo più breve
249249
from transformers import pipeline
250250

251251
summarizer = pipeline("summarization")
252-
summarizer(
253-
"""
252+
summarizer("""
254253
America has changed dramatically during recent years. Not only has the number of
255254
graduates in traditional engineering disciplines such as mechanical, civil,
256255
electrical, chemical, and aeronautical engineering declined, but in most of
@@ -269,8 +268,7 @@ summarizer(
269268
Other industrial countries at minimum maintain their output, while America
270269
suffers an increasingly serious decline in the number of engineering graduates
271270
and a lack of well-educated engineers.
272-
"""
273-
)
271+
""")
274272
```
275273

276274
```python out

chapters/ja/chapter1/3.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,7 @@ question_answerer(
252252
from transformers import pipeline
253253

254254
summarizer = pipeline("summarization")
255-
summarizer(
256-
"""
255+
summarizer("""
257256
America has changed dramatically during recent years. Not only has the number of
258257
graduates in traditional engineering disciplines such as mechanical, civil,
259258
electrical, chemical, and aeronautical engineering declined, but in most of
@@ -271,8 +270,7 @@ summarizer(
271270
Other industrial countries at minimum maintain their output, while America
272271
suffers an increasingly serious decline in the number of engineering graduates
273272
and a lack of well-educated engineers.
274-
"""
275-
)
273+
""")
276274
```
277275

278276
```python out

chapters/ko/chapter1/3.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,7 @@ question_answerer(
249249
from transformers import pipeline
250250

251251
summarizer = pipeline("summarization")
252-
summarizer(
253-
"""
252+
summarizer("""
254253
America has changed dramatically during recent years. Not only has the number of
255254
graduates in traditional engineering disciplines such as mechanical, civil,
256255
electrical, chemical, and aeronautical engineering declined, but in most of
@@ -269,8 +268,7 @@ summarizer(
269268
Other industrial countries at minimum maintain their output, while America
270269
suffers an increasingly serious decline in the number of engineering graduates
271270
and a lack of well-educated engineers.
272-
"""
273-
)
271+
""")
274272
```
275273

276274
```python out

0 commit comments

Comments
 (0)