wilmerags commited on
Commit
1731f45
1 Parent(s): 92e2ae9

test: Lower perplexity to test number of topics created

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -32,7 +32,7 @@ def embed_text(text: List[str], model: SentenceTransformer) -> np.ndarray:
32
  return model.encode(text)
33
 
34
  def get_tsne_embeddings(
35
- embeddings: np.ndarray, perplexity: int = 15, n_components: int = 2, init: str = "pca", n_iter: int = 5000, random_state: int = SEED
36
  ) -> np.ndarray:
37
  tsne = TSNE(perplexity=perplexity, n_components=n_components, init=init, n_iter=n_iter, random_state=random_state)
38
  return tsne.fit_transform(embeddings)
 
32
  return model.encode(text)
33
 
34
  def get_tsne_embeddings(
35
+ embeddings: np.ndarray, perplexity: int = 10, n_components: int = 2, init: str = "pca", n_iter: int = 5000, random_state: int = SEED
36
  ) -> np.ndarray:
37
  tsne = TSNE(perplexity=perplexity, n_components=n_components, init=init, n_iter=n_iter, random_state=random_state)
38
  return tsne.fit_transform(embeddings)