Unable to get topics for image only model #1887
-
Hi @MaartenGr , I have trained a image only model by referring this scetion of BERTopic documentation. I was able to successfully train & save the model and see the topic representation as well. Then I have tried to load my saved model and find topics for another set of images using This is how I tried to get the topics This is the error I'm getting. ValueError: text input must be of type `str` (single example), `List[str]` (batch or single pretokenized example) or `List[List[str]]` (batch of pretokenized examples). I have tried the same with Any advice on this ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Have you tried to pass the embedding model when loading in the topic model? For instance, |
Beta Was this translation helpful? Give feedback.
I am not entirely sure but there might be something going on with this line:
You are overwriting a backend with a variable which might be an issue later on. Instead, do something like this:
and pass that to
embedding_model
.It seems you are using a different backend between saving and loading the model.