ping98k commited on
Commit
88218fc
·
1 Parent(s): f92828b

Refactor README.md to enhance feature descriptions and improve usage instructions for clarity and consistency.

Browse files
Files changed (1) hide show
  1. README.md +16 -16
README.md CHANGED
@@ -16,20 +16,17 @@ models:
16
 
17
  This is a browser-based playground for exploring text embeddings, group similarity, and clustering using WebGPU and ONNX models.
18
 
19
- ## How it works
20
- - **Input text** in the textarea. Use single newlines (`\n`) to separate lines within a group, and triple newlines (`\n\n\n`) to separate groups.
21
- - For each line, the following prompt is used:
22
-
23
- `Instruct: Given a textual input sentence, retrieve relevant categories that best describe it.\nQuery:{your sentence}`
24
- - All lines in a group are embedded in a single batch call, with pooling set to `mean` and normalization enabled.
25
- - Each group is averaged to a single embedding.
26
- - Cosine similarity is calculated between all group embeddings, resulting in a group-by-group similarity matrix.
27
- - The similarity matrix is visualized as a heatmap using Plotly (color range locked to 0–1).
28
-
29
- ## K-Means Clustering & UMAP
30
- - Enter the number of clusters in the **Clusters:** input.
31
- - Click **Cluster & Show UMAP** to cluster all lines (ignoring groups) using K-Means and visualize the result with UMAP in a scatter plot.
32
- - After clustering, the textarea is updated to group lines by cluster (triple newlines between clusters), and the heatmap is automatically refreshed to reflect the new groupings.
33
 
34
  ## Tech stack
35
  - [@huggingface/transformers](https://www.npmjs.com/package/@huggingface/transformers) (ESM, WebGPU)
@@ -40,7 +37,10 @@ This is a browser-based playground for exploring text embeddings, group similari
40
  ## Usage
41
  1. Enter or paste your text in the textarea.
42
  2. Separate groups with triple newlines if you want to compare group similarity.
43
- 3. Click **Show Similarity Heatmap** to compute and visualize group similarities.
44
- 4. To cluster all lines, set the number of clusters and click **Cluster & Show UMAP**. The textarea and heatmap will update to reflect the new clusters.
 
 
 
45
 
46
  ---
 
16
 
17
  This is a browser-based playground for exploring text embeddings, group similarity, and clustering using WebGPU and ONNX models.
18
 
19
+ ## Features
20
+ - **Text search**: Use your browser's search (Ctrl+F) to quickly find and highlight text within the textarea or results.
21
+ - **Text input**: Enter text in the textarea. Use single newlines (`\n`) to separate lines within a group, and triple newlines (`\n\n\n`) to separate groups.
22
+ - **Group similarity heatmap**: Click **Show Similarity Heatmap** to compute and visualize cosine similarity between group embeddings as a heatmap.
23
+ - **Search cluster reordering**: If a group header contains the word `search`, you can control how other groups and lines are ordered relative to the search group using the **Search Cluster Sort Mode** dropdown:
24
+ - **By Group Similarity**: Orders groups by similarity to the search group, and lines within each group by similarity to the search group embedding.
25
+ - **By Max Search Line**: Orders lines within each group by their maximum similarity to any line in the search group.
26
+ - **K-Means & Balanced K-Means clustering**: Set the number of clusters and clustering type, then click **Clustering** to group all lines into clusters. The textarea is updated to reflect the new clusters.
27
+ - **UMAP scatter plot**: Click **Cluster Plot** to visualize clusters in 2D using UMAP. Cluster names are shown in the legend.
28
+ - **Cluster naming**: Click **Naming Cluster** to generate descriptive names for each cluster using a text generation model. Names are updated in both the textarea and the scatter plot legend.
29
+ - **Progress bar**: All major actions display a progress bar during processing.
 
 
 
30
 
31
  ## Tech stack
32
  - [@huggingface/transformers](https://www.npmjs.com/package/@huggingface/transformers) (ESM, WebGPU)
 
37
  ## Usage
38
  1. Enter or paste your text in the textarea.
39
  2. Separate groups with triple newlines if you want to compare group similarity.
40
+ 3. (Optional) Use the **Search Cluster Sort Mode** dropdown to control how the search cluster reorders groups/lines.
41
+ 4. Click **Show Similarity Heatmap** to compute and visualize group similarities.
42
+ 5. To cluster all lines, set the number of clusters and click **Clustering**. The textarea and heatmap will update to reflect the new clusters.
43
+ 6. Click **Cluster Plot** to visualize clusters in 2D.
44
+ 7. Click **Naming Cluster** to generate descriptive names for each cluster.
45
 
46
  ---