Spaces:
Sleeping
Sleeping
Commit
·
f9c9d9f
1
Parent(s):
553b9ec
Update app.py
Browse files
app.py
CHANGED
@@ -71,12 +71,14 @@ app = Topically(os.environ["CO_API_KEY"])
|
|
71 |
|
72 |
df['topic_name'], topic_names = app.name_topics((df['content.title'], df['topic']), num_generations=5)
|
73 |
|
74 |
-
st.write("Topics extracted are:", topic_names)
|
75 |
|
76 |
topic_model.set_topic_labels(topic_names)
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
|
|
|
|
|
71 |
|
72 |
df['topic_name'], topic_names = app.name_topics((df['content.title'], df['topic']), num_generations=5)
|
73 |
|
74 |
+
#st.write("Topics extracted are:", topic_names)
|
75 |
|
76 |
topic_model.set_topic_labels(topic_names)
|
77 |
+
fig = topic_model.visualize_documents(df['content.title'].values,
|
78 |
+
embeddings=embeds_npy,
|
79 |
+
topics = list(range(8)),
|
80 |
+
custom_labels=True,
|
81 |
+
width=900,
|
82 |
+
height=600)
|
83 |
+
st.pyplot(fig)
|
84 |
+
|