[Fix] Type Hint in from_pretrained() to Ensure Correct Type Inference (#10714)
* Update pipeline_utils.py
Added Self in from_pretrained method so inference will correctly recognize pipeline
* Use typing_extensions
---------
Co-authored-by: hlky <hlky@hlky.ac>