Roberta2024 commited on
Commit
1f37348
1 Parent(s): 3aa3893

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -7,11 +7,11 @@ from sklearn.decomposition import PCA
7
  from scipy.cluster.hierarchy import fcluster
8
 
9
  # ================== 加載保存的模型 ==================
10
- scaler = joblib.load('/content/gdrive/My Drive/scaler.sav') # 標準化模型
11
- pca = joblib.load('/content/gdrive/My Drive/pca_model.sav') # PCA 模型
12
- kmeans = joblib.load('/content/gdrive/My Drive/kmeans_model.sav') # K-means 模型
13
- linked = joblib.load('/content/gdrive/My Drive/hierarchical_model.sav') # 階層式聚類模型
14
- dbscan = joblib.load('/content/gdrive/My Drive/dbscan_model.sav') # DBSCAN 模型
15
 
16
  # 定義繪圖函數
17
  def plot_clusters(data, labels, title):
 
7
  from scipy.cluster.hierarchy import fcluster
8
 
9
  # ================== 加載保存的模型 ==================
10
+ scaler = joblib.load('scaler.sav') # 標準化模型
11
+ pca = joblib.load('pca_model.sav') # PCA 模型
12
+ kmeans = joblib.load('kmeans_model.sav') # K-means 模型
13
+ linked = joblib.load('hierarchical_model.sav') # 階層式聚類模型
14
+ dbscan = joblib.load('dbscan_model.sav') # DBSCAN 模型
15
 
16
  # 定義繪圖函數
17
  def plot_clusters(data, labels, title):