Sync from GitHub Actions
Browse files
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 |
```
|