Unverified Commit af45ec0a authored by Samin Yasar's avatar Samin Yasar Committed by GitHub
Browse files

add type hint in pipeline model argument (#23740)

* add type hint in pipeline model argument

* add pretrainedmodel and tfpretainedmodel type hint

* make type hints string
parent 4b6a5a7c
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment