wuhp commited on
Commit
fe3c81f
·
verified ·
1 Parent(s): 6af16b8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -1834,6 +1834,8 @@ with gr.Blocks(title="Email Investigator — Per-bucket-k + Label Dedup + Survei
1834
  k = max(10, int(k_clusters or 350))
1835
  k = int(max(2, round(k * _bucket_k_multiplier(bucket_name))))
1836
 
 
 
1837
  init = None
1838
  if use_lsa and isinstance(X_space, np.ndarray) and count_vec is not None:
1839
  seeds = seeded_centroids_in_lsa(
@@ -2358,4 +2360,4 @@ with gr.Blocks(title="Email Investigator — Per-bucket-k + Label Dedup + Survei
2358
 
2359
  if __name__ == "__main__":
2360
  # Disable SSR to avoid handler arity warnings under server-side rendering
2361
- demo.launch(ssr_mode=False)
 
1834
  k = max(10, int(k_clusters or 350))
1835
  k = int(max(2, round(k * _bucket_k_multiplier(bucket_name))))
1836
 
1837
+ k = min(k, n)
1838
+
1839
  init = None
1840
  if use_lsa and isinstance(X_space, np.ndarray) and count_vec is not None:
1841
  seeds = seeded_centroids_in_lsa(
 
2360
 
2361
  if __name__ == "__main__":
2362
  # Disable SSR to avoid handler arity warnings under server-side rendering
2363
+ demo.launch(ssr_mode=False)