surazbhandari commited on
Commit
e2a15cc
·
verified ·
1 Parent(s): 88411a9

Sync from GitHub Actions

Browse files
Files changed (1) hide show
  1. README.md +2 -0
README.md CHANGED
@@ -78,6 +78,8 @@ for r in results:
78
 
79
  # Clustering
80
  result = model.cluster_texts(["ML is cool", "Pizza is food", "AI rocks"], n_clusters=2)
 
 
81
  # Cluster 1: ['Pizza is food']
82
  # Cluster 2: ['ML is cool', 'AI rocks']
83
  ```
 
78
 
79
  # Clustering
80
  result = model.cluster_texts(["ML is cool", "Pizza is food", "AI rocks"], n_clusters=2)
81
+ for cluster_id, texts in result['texts_by_cluster'].items():
82
+ print(f"Cluster {cluster_id + 1}: {texts}")
83
  # Cluster 1: ['Pizza is food']
84
  # Cluster 2: ['ML is cool', 'AI rocks']
85
  ```