I am storing my model in this manner:
embedding_model = "sentence-transformers/all-MiniLM-L6-v2"topic_model.save("data/topic_model", serialization="safetensors", save_ctfidf=True, save_embedding_model=embedding_model)
Then, I load it like:
topic_model = BERTopic.load("/tmp/topic_model")
Then I want to use the original set of documents that the model was fitted on to visualize these topics over time.
I am storing my model in this manner:
embedding_model = "sentence-transformers/all-MiniLM-L6-v2"
topic_model.save("data/topic_model", serialization="safetensors", save_ctfidf=True, save_embedding_model=embedding_model)
Then, I load it like:
topic_model = BERTopic.load("/tmp/topic_model")
Then I want to use the original set of documents that the model was fitted on to visualize these topics over time.
topics_over_time = main_model.topics_over_time( ticket_training_set.description, ticket_training_set.created_at, nr_bins=30 )
main_model.visualize_topics_over_time(topics_over_time)
I get the following error:
The same error happens on other visualizations, such as
topic_model.visualize_hierarchy()
.What am I missing here? Thank you.