Spaces:
Running
Running
Update streamlit_app.py
Browse files- streamlit_app.py +1 -1
streamlit_app.py
CHANGED
|
@@ -318,7 +318,7 @@ if active_df is not None and not active_df.empty:
|
|
| 318 |
from sklearn.manifold import TSNE
|
| 319 |
matrix = np.vstack(weekly_df['embedding'].apply(json.loads).values)
|
| 320 |
|
| 321 |
-
clusterer = AgglomerativeClustering(n_clusters=None, distance_threshold=0.
|
| 322 |
weekly_df['cluster'] = clusterer.fit_predict(matrix)
|
| 323 |
|
| 324 |
num_clusters = weekly_df['cluster'].nunique()
|
|
|
|
| 318 |
from sklearn.manifold import TSNE
|
| 319 |
matrix = np.vstack(weekly_df['embedding'].apply(json.loads).values)
|
| 320 |
|
| 321 |
+
clusterer = AgglomerativeClustering(n_clusters=None, distance_threshold=0.45, metric='cosine', linkage='complete')
|
| 322 |
weekly_df['cluster'] = clusterer.fit_predict(matrix)
|
| 323 |
|
| 324 |
num_clusters = weekly_df['cluster'].nunique()
|