RamAnanth1 commited on
Commit
2b70172
1 Parent(s): bcd8921

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -55,14 +55,14 @@ if "CO_API_KEY" not in os.environ:
55
  ".streamlit/secrets.toml or as an environment variable.")
56
 
57
  co = cohere.Client(os.environ["CO_API_KEY"])
58
- list_of_titles = list(df["content.title"].values)
59
-
60
- embeds = co.embed(texts=list_of_titles,
61
- model="small").embeddings
62
-
63
- embeds_npy = np.array(embeds)
64
 
65
  def get_visualizations():
 
 
 
 
 
 
66
  # Load and initialize BERTopic to use KMeans clustering with 8 clusters only.
67
  cluster_model = KMeans(n_clusters=8)
68
  topic_model = BERTopic(hdbscan_model=cluster_model)
 
55
  ".streamlit/secrets.toml or as an environment variable.")
56
 
57
  co = cohere.Client(os.environ["CO_API_KEY"])
 
 
 
 
 
 
58
 
59
  def get_visualizations():
60
+ list_of_titles = list(df["content.title"].values)
61
+ embeds = co.embed(texts=list_of_titles,
62
+ model="small").embeddings
63
+
64
+ embeds_npy = np.array(embeds)
65
+
66
  # Load and initialize BERTopic to use KMeans clustering with 8 clusters only.
67
  cluster_model = KMeans(n_clusters=8)
68
  topic_model = BERTopic(hdbscan_model=cluster_model)