Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/transformers/pipelines/audio_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class AudioClassificationPipeline(Pipeline):
[{'score': 0.997, 'label': '_unknown_'}, {'score': 0.002, 'label': 'left'}, {'score': 0.0, 'label': 'yes'}, {'score': 0.0, 'label': 'down'}, {'score': 0.0, 'label': 'stop'}]
```

[Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial)
Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial)


This pipeline can currently be loaded from [`pipeline`] using the following task identifier:
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/pipelines/automatic_speech_recognition.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class AutomaticSpeechRecognitionPipeline(ChunkPipeline):
{'text': ' He hoped there would be stew for dinner, turnips and carrots and bruised potatoes and fat mutton pieces to be ladled out in thick, peppered flour fat and sauce.'}
```

[Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial)
Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial)

Arguments:
model ([`PreTrainedModel`] or [`TFPreTrainedModel`]):
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/pipelines/conversational.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class ConversationalPipeline(Pipeline):
"It's a comedy."
```

[Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial)
Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial)

This conversational pipeline can currently be loaded from [`pipeline`] using the following task identifier:
`"conversational"`.
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/pipelines/depth_estimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class DepthEstimationPipeline(Pipeline):
torch.Size([1, 384, 384])
```

[Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial)
Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial)


This depth estimation pipeline can currently be loaded from [`pipeline`] using the following task identifier:
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/pipelines/document_question_answering.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class DocumentQuestionAnsweringPipeline(ChunkPipeline):
[{'score': 0.425, 'answer': 'us-001', 'start': 16, 'end': 16}]
```

[Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial)
Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial)

This document question answering pipeline can currently be loaded from [`pipeline`] using the following task
identifier: `"document-question-answering"`.
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/pipelines/feature_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class FeatureExtractionPipeline(Pipeline):
torch.Size([1, 8, 768])
```

[Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial)
Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial)

This feature extraction pipeline can currently be loaded from [`pipeline`] using the task identifier:
`"feature-extraction"`.
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/pipelines/fill_mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class FillMaskPipeline(Pipeline):
[{'score': 0.042, 'token': 3291, 'token_str': 'problem', 'sequence': 'this is a simple problem.'}, {'score': 0.031, 'token': 3160, 'token_str': 'question', 'sequence': 'this is a simple question.'}, {'score': 0.03, 'token': 8522, 'token_str': 'equation', 'sequence': 'this is a simple equation.'}, {'score': 0.027, 'token': 2028, 'token_str': 'one', 'sequence': 'this is a simple one.'}, {'score': 0.024, 'token': 3627, 'token_str': 'rule', 'sequence': 'this is a simple rule.'}]
```

[Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial)
Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial)

This mask filling pipeline can currently be loaded from [`pipeline`] using the following task identifier:
`"fill-mask"`.
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/pipelines/image_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class ImageClassificationPipeline(Pipeline):
[{'score': 0.442, 'label': 'macaw'}, {'score': 0.088, 'label': 'popinjay'}, {'score': 0.075, 'label': 'parrot'}, {'score': 0.073, 'label': 'parodist, lampooner'}, {'score': 0.046, 'label': 'poll, poll_parrot'}]
```

[Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial)
Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial)

This image classification pipeline can currently be loaded from [`pipeline`] using the following task identifier:
`"image-classification"`.
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/pipelines/image_to_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ImageToTextPipeline(Pipeline):
[{'generated_text': 'two birds are standing next to each other '}]
```

[Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial)
Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial)

This image to text pipeline can currently be loaded from pipeline() using the following task identifier:
"image-to-text".
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/pipelines/object_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ObjectDetectionPipeline(Pipeline):
>>> # x, y are expressed relative to the top left hand corner.
```

[Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial)
Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial)

This object detection pipeline can currently be loaded from [`pipeline`] using the following task identifier:
`"object-detection"`.
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/pipelines/question_answering.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ class QuestionAnsweringPipeline(ChunkPipeline):
{'score': 0.9191, 'start': 34, 'end': 40, 'answer': 'Berlin'}
```

[Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial)
Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial)

This question answering pipeline can currently be loaded from [`pipeline`] using the following task identifier:
`"question-answering"`.
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/pipelines/table_question_answering.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class TableQuestionAnsweringPipeline(Pipeline):
{'answer': 'AVERAGE > 36542', 'coordinates': [(0, 1)], 'cells': ['36542'], 'aggregator': 'AVERAGE'}
```

[Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial)
Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial)

This tabular question answering pipeline can currently be loaded from [`pipeline`] using the following task
identifier: `"table-question-answering"`.
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/pipelines/text2text_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Text2TextGenerationPipeline(Pipeline):
[{'generated_text': 'question: Who created the RuPERTa-base?'}]
```

[Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial)
Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial)


This Text2TextGenerationPipeline pipeline can currently be loaded from [`pipeline`] using the following task
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/pipelines/text_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class TextClassificationPipeline(Pipeline):
[{'label': 'NEGATIVE', 'score': 0.996}]
```

[Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial)
Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial)

This text classification pipeline can currently be loaded from [`pipeline`] using the following task identifier:
`"sentiment-analysis"` (for classifying sequences according to positive or negative sentiments).
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/pipelines/text_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class TextGenerationPipeline(Pipeline):
>>> outputs = generator("My tart needs some", num_return_sequences=4, return_full_text=False)
```

[Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial)
Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial)

This language generation pipeline can currently be loaded from [`pipeline`] using the following task identifier:
`"text-generation"`.
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/pipelines/token_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class TokenClassificationPipeline(Pipeline):
[{'entity_group': 'PRON', 'score': 0.999, 'word': 'my', 'start': 0, 'end': 2}, {'entity_group': 'NOUN', 'score': 0.997, 'word': 'name', 'start': 3, 'end': 7}, {'entity_group': 'AUX', 'score': 0.994, 'word': 'is', 'start': 8, 'end': 10}, {'entity_group': 'PROPN', 'score': 0.999, 'word': 'sarah', 'start': 11, 'end': 16}, {'entity_group': 'CCONJ', 'score': 0.999, 'word': 'and', 'start': 17, 'end': 20}, {'entity_group': 'PRON', 'score': 0.999, 'word': 'i', 'start': 21, 'end': 22}, {'entity_group': 'VERB', 'score': 0.998, 'word': 'live', 'start': 23, 'end': 27}, {'entity_group': 'ADP', 'score': 0.999, 'word': 'in', 'start': 28, 'end': 30}, {'entity_group': 'PROPN', 'score': 0.999, 'word': 'london', 'start': 31, 'end': 37}]
```

[Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial)
Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial)

This token recognition pipeline can currently be loaded from [`pipeline`] using the following task identifier:
`"ner"` (for predicting the classes of tokens in a sequence: person, organisation, location or miscellaneous).
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/pipelines/visual_question_answering.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class VisualQuestionAnsweringPipeline(Pipeline):
[{'score': 0.996, 'answer': 'no'}]
```

[Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial)
Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial)

This visual question answering pipeline can currently be loaded from [`pipeline`] using the following task
identifiers: `"visual-question-answering", "vqa"`.
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/pipelines/zero_shot_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class ZeroShotClassificationPipeline(ChunkPipeline):
{'sequence': 'I have a problem with my iphone that needs to be resolved asap!!', 'labels': ['english', 'german'], 'scores': [0.814, 0.186]}
```

[Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial)
Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial)

This NLI pipeline can currently be loaded from [`pipeline`] using the following task identifier:
`"zero-shot-classification"`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class ZeroShotImageClassificationPipeline(ChunkPipeline):
[{'score': 0.996, 'label': 'black and white'}, {'score': 0.003, 'label': 'photorealist'}, {'score': 0.0, 'label': 'painting'}]
```

[Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial)
Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial)

This image classification pipeline can currently be loaded from [`pipeline`] using the following task identifier:
`"zero-shot-image-classification"`.
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/pipelines/zero_shot_object_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class ZeroShotObjectDetectionPipeline(Pipeline):
[[{'score': 0.119, 'label': 'bird', 'box': {'xmin': 71, 'ymin': 170, 'xmax': 410, 'ymax': 508}}]]
```

[Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial)
Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial)

This object detection pipeline can currently be loaded from [`pipeline`] using the following task identifier:
`"zero-shot-object-detection"`.
Expand Down