BERTopic
BERTopic copied to clipboard
embedding_model and language cannot be both specified
Hi,
I was playing with some changes in the embedding model, but when I initialized the BERTopic object with arguments:
topic_model = BERTopic( language="multilingual", hdbscan_model=hdbscan_model, embedding_model=embedding_model, )
I got error "ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()".
I think the line 216 of bertopic/_bertopic.py should be changed to
self.language = language if embedding_model is None else None
I will submit a PR in a moment
Thanks for the PR. Let's first take a step back and let me confirm the issue. Could you share an end to end example and the full error log?
After a while I cannot recreate this error, so I think this issue can be closed.