You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using zero shot topic modeling using bertopic and i also want hierarchical topic representation but When i run the model.hierarchical_topics(array of strings) the following errors is what i get:
TypeError: 'NoneType' object is not subscriptable
TypeError Traceback (most recent call last)
File , line 1
----> 1 model.hierarchical_topics(array of strings)
I am using zero shot topic modeling using bertopic and i also want hierarchical topic representation but When i run the model.hierarchical_topics(array of strings) the following errors is what i get:
TypeError: 'NoneType' object is not subscriptable
TypeError Traceback (most recent call last)
File , line 1
----> 1 model.hierarchical_topics(array of strings)
File /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.10/site-packages/bertopic/bertopic.py:975, in BERTopic.hierarchical_topics(self, docs, linkage_function, distance_function)
972 linkage_function = lambda x: sch.linkage(x, 'ward', optimal_ordering=True)
974 # Calculate distance
--> 975 embeddings = self.c_tf_idf[self._outliers:]
976 X = distance_function(embeddings)
977 X = validate_distance_matrix(X, embeddings.shape[0])
TypeError: 'NoneType' object is not subscriptable
The text was updated successfully, but these errors were encountered: