This commit is contained in:
2025-08-11 02:49:41 +01:00
parent 4ca7e8ab61
commit 647111e9d3
3 changed files with 111 additions and 47 deletions

View File

@@ -67,10 +67,12 @@ def main():
st.info(f"📈 Visualizing {len(filtered_df)} messages")
# Reduce dimensions
n_components = 3 if params['enable_3d'] else 2
with st.spinner(f"Reducing dimensions using {params['method']}..."):
reduced_embeddings = reduce_dimensions(
filtered_embeddings,
method=params['method'],
n_components=n_components,
spread_factor=params['spread_factor'],
perplexity_factor=params['perplexity_factor'],
min_dist_factor=params['min_dist_factor']
@@ -110,7 +112,8 @@ def main():
point_size=params['point_size'],
point_opacity=params['point_opacity'],
density_based_sizing=params['density_based_sizing'],
size_variation=params['size_variation']
size_variation=params['size_variation'],
enable_3d=params['enable_3d']
)
st.plotly_chart(fig, use_container_width=True)
@@ -121,7 +124,7 @@ def main():
# Display clustering results and export options
display_clustering_results(
filtered_df, cluster_labels, reduced_embeddings,
params['method'], params['clustering_method']
params['method'], params['clustering_method'], params['enable_3d']
)
# Display data table