Skip to content

Commit

Permalink
Remove check for embedding model when check if zero-shot (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianrandman committed Jun 18, 2024
1 parent 02134d6 commit cfd75a4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bertopic/_bertopic.py
Original file line number Diff line number Diff line change
Expand Up @@ -3612,11 +3612,10 @@ def _zeroshot_topic_modeling(self, documents: pd.DataFrame, embeddings: np.ndarr
def _is_zeroshot(self):
""" Check whether zero-shot topic modeling is possible
* There should be a cluster model used
* Embedding model is necessary to convert zero-shot topics to embeddings
* Zero-shot topics should be defined
"""
if self.zeroshot_topic_list is not None and self.embedding_model is not None and type(self.hdbscan_model) != BaseCluster:
if self.zeroshot_topic_list is not None and self.embedding_model is not None:
return True
return False

Expand Down

0 comments on commit cfd75a4

Please sign in to comment.