PrithivirajDamodaran / Parrot_Paraphraser

A practical and feature-rich paraphrasing framework to augment human intents in text form to build robust NLU models for conversational engines. Created by Prithiviraj Damodaran. Open to pull requests and other forms of collaboration.
Apache License 2.0
866 stars 141 forks source link

Unable to use the model due to Huggingface updated API #38

Open LEAGUEDORA opened 1 year ago

LEAGUEDORA commented 1 year ago

Hii. You might be unable to use the Parrot model due to an error something like this ...is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models'...

To solve this I already created a pull request. Till then you can open the Parrot Library source code in your code editor and add these update these lines lines (13, 14 lines most probably)

self.tokenizer = AutoTokenizer.from_pretrained(model_tag, use_auth_token = <your auth token>)
self.model     = AutoModelForSeq2SeqLM.from_pretrained(model_tag, use_auth_token = <your auth token>)
PrithivirajDamodaran commented 1 year ago

I added a new demo notebook, and everything works fine. (check for the link in Readme)