Skip to content
Snippets Groups Projects
Commit 329bb09a authored by MAFTOUH Mohammed Amine's avatar MAFTOUH Mohammed Amine
Browse files

Add new file

parent 98b58d8b
No related branches found
No related tags found
No related merge requests found
def print_topics_per_cluster(df, agg_labels):
# Ajouter agg_labels comme colonne 'cluster' dans df
df['cluster'] = agg_labels
print("\nTopics par cluster pour l'ensemble des données :")
for cluster in sorted(df['cluster'].unique()):
print(f"\nCluster {cluster}:")
messages_cluster = df[df['cluster'] == cluster]['message'].tolist()
topics = generate_topics_for_cluster(messages_cluster)
print("Topics générés:", topics)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment