transformers
ddf177ee - Set `inputs` as kwarg in `TextClassificationPipeline` (#29495)

Commit
1 year ago
Set `inputs` as kwarg in `TextClassificationPipeline` (#29495) * Set `inputs` as kwarg in `TextClassificationPipeline` This change has been done to align the `TextClassificationPipeline` with the rest of the pipelines, and to be able to e.g. `pipeline(**{"inputs": "text"})` which wouldn't be possible since the `*args` were being used instead. * Add `noqa: C409` on `tuple([inputs],)` Even though is discouraged by the linter, the cast `tuple(list(...),)` is required here, as otherwise the original list in `inputs` will be transformed into a `tuple` and the elements 1...N will be ignored by the `Pipeline` * Run `ruff format` * Simplify `tuple` conversion with `(inputs,)` Co-authored-by: Matt <Rocketknight1@users.noreply.github.com> --------- Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
Author
Parents
Loading