Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -64,12 +64,14 @@ local_model_path = snapshot_download(repo_id=MODEL_NAME, cache_dir=cache_dir)
|
|
| 64 |
embeddings = SentenceTransformer(local_model_path, cache_folder=cache_dir)
|
| 65 |
|
| 66 |
# Pre-initialize fallback global models for small-batch debugging
|
| 67 |
-
# Global UMAP: 2-neighbors, cosine space, random init
|
|
|
|
| 68 |
n_neighbors=2,
|
| 69 |
metric="cosine",
|
| 70 |
init="random",
|
| 71 |
random_state=42
|
| 72 |
)
|
|
|
|
| 73 |
# Global HDBSCAN: min cluster size 2, min_samples 1, cosine metric
|
| 74 |
global_hdbscan = HDBSCAN(
|
| 75 |
min_cluster_size=2,
|
|
|
|
| 64 |
embeddings = SentenceTransformer(local_model_path, cache_folder=cache_dir)
|
| 65 |
|
| 66 |
# Pre-initialize fallback global models for small-batch debugging
|
| 67 |
+
# Global UMAP: 2-neighbors, cosine space, random init
|
| 68 |
+
global_umap = UMAP(
|
| 69 |
n_neighbors=2,
|
| 70 |
metric="cosine",
|
| 71 |
init="random",
|
| 72 |
random_state=42
|
| 73 |
)
|
| 74 |
+
|
| 75 |
# Global HDBSCAN: min cluster size 2, min_samples 1, cosine metric
|
| 76 |
global_hdbscan = HDBSCAN(
|
| 77 |
min_cluster_size=2,
|