mirror of
https://github.com/saymrwulf/transformers.git
synced 2026-05-14 20:58:08 +00:00
parent
77080f023f
commit
0531d7513b
1 changed files with 1 additions and 1 deletions
|
|
@ -184,7 +184,7 @@ class PairClassificationPipeline(Pipeline):
|
||||||
```
|
```
|
||||||
|
|
||||||
The implementation is framework agnostic, and will work for PyTorch and TensorFlow models. If we have saved this in
|
The implementation is framework agnostic, and will work for PyTorch and TensorFlow models. If we have saved this in
|
||||||
a file named `pair_classification.py`, we can then import it and register it like this:
|
a file named `pair_classification.py`, we can then import it and register it like this. The [register_pipeline](https://github.com/huggingface/transformers/blob/9feae5fb0164e89d4998e5776897c16f7330d3df/src/transformers/pipelines/base.py#L1387) function registers the pipeline details (task type, pipeline class, supported backends) to a models `config.json` file.
|
||||||
|
|
||||||
```py
|
```py
|
||||||
from pair_classification import PairClassificationPipeline
|
from pair_classification import PairClassificationPipeline
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue