I am getting in calling tokenizer
code:
from transformers import PegasusTokenizer, PegasusForConditionalGeneration, TFPegasusForConditionalGeneration
model_name = "human-centered-summarization/financial-summarization-pegasus"
tokenizer = PegasusTokenizer.from_pretrained(model_name)
model = PegasusForConditionalGeneration.from_pretrained(model_name)
Error:
TypeError Traceback (most recent call last)
Cell In[20], line 4
1 from transformers import PegasusTokenizer, PegasusForConditionalGeneration, TFPegasusForConditionalGeneration
3 model_name = "human-centered-summarization/financial-summarization-pegasus"
----> 4 tokenizer = PegasusTokenizer.from_pretrained(model_name)
5 model = PegasusForConditionalGeneration.from_pretrained(model_name)
TypeError: 'NoneType' object is not callable
I got this error after install sentencepiece. To solve this, restart your notebook and re-run the code