Skip to content

Commit

Permalink
add type hint in pipeline model argument (huggingface#23740)
Browse files Browse the repository at this point in the history
* add type hint in pipeline model argument

* add pretrainedmodel and tfpretainedmodel type hint

* make type hints string
  • Loading branch information
y3sar authored and sheonhan committed Jun 1, 2023
1 parent 0e1d17b commit ba7afe8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/pipelines/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ def clean_custom_task(task_info):

def pipeline(
task: str = None,
model: Optional = None,
model: Optional[Union[str, "PreTrainedModel", "TFPreTrainedModel"]] = None,
config: Optional[Union[str, PretrainedConfig]] = None,
tokenizer: Optional[Union[str, PreTrainedTokenizer, "PreTrainedTokenizerFast"]] = None,
feature_extractor: Optional[Union[str, PreTrainedFeatureExtractor]] = None,
Expand Down

0 comments on commit ba7afe8

Please sign in to comment.