How to load a pipeline saved with pipeline.save_pretrained?


I have a system saving an HF pipeline with the following code:

from transformers import pipeline
text_generator = pipeline('...')

How can I re-instantiate that model from a different system

What code snippet can do that? I’m looking for something like p = pipeline.from_pretrained('...') but couldn’t find such a thing in the doc

I think pipeline(task, 'modeldir') should work to reload it.

1 Like

looks good thanks!

1 Like

Thank you for your comment
this give me this error
HTTPError: 404 Client Error: Not Found for url: