Question about TF-IDF in RASA

Hello,

I wanted to do a custom component for tf-idf vectorizer as is count vectorizer. I followed the CountVectorsFeaturizer code. However, when I set use_idf to True I get the following error ValueError: Input has n_features=1081 while the model has been trained with n_features=81. When use_idf is set to False everything works. I uploaded the code in TF-IDF in RASA

Thanks in advance