sdbrgo commited on
Commit
d32bc23
·
verified ·
1 Parent(s): 7c05f8d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -43,8 +43,8 @@ def final_clustering(file, top_features):
43
  labels = kmeans.fit_predict(X_pca)
44
 
45
  # Cluster Analysis
46
- pca = pipeline.names_steps["pca"]
47
- scaler = pipeline.names_steps["scaler"]
48
  feature_names = df.columns.tolist()
49
  centroids = compute_cluster_centroids(X_pca, labels) # function is from cluster_utils
50
  original_centroids = inverse_project_centroids(
@@ -84,7 +84,7 @@ with gr.Blocks(title="PERCEUL: Perception-Based Worker Profiler") as app:
84
  )
85
 
86
  run_btn = gr.Button("Run Final Clustering")
87
- best_k_out = gr.Number(label="Selected K",interactive=False, precision=0)
88
  drivers_out = gr.JSON(label="Top Feature Drivers per Cluster")
89
 
90
  run_btn.click(
 
43
  labels = kmeans.fit_predict(X_pca)
44
 
45
  # Cluster Analysis
46
+ pca = core_pipeline.named_steps["pca"]
47
+ scaler = pipeline.named_steps["scaler"]
48
  feature_names = df.columns.tolist()
49
  centroids = compute_cluster_centroids(X_pca, labels) # function is from cluster_utils
50
  original_centroids = inverse_project_centroids(
 
84
  )
85
 
86
  run_btn = gr.Button("Run Final Clustering")
87
+ best_k_out = gr.Number(label="Selected K", interactive=False, precision=0)
88
  drivers_out = gr.JSON(label="Top Feature Drivers per Cluster")
89
 
90
  run_btn.click(