raxhel commited on
Commit
3872cb9
·
verified ·
1 Parent(s): b070005
Files changed (1) hide show
  1. app.py +12 -0
app.py CHANGED
@@ -99,6 +99,18 @@ if SOM_FILE_AVAILABLE: # 檢查 'som_analyzer.py' 是否 import 成功
99
 
100
  print(" Local files found.")
101
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  # ----------------------------------------------------------
103
  # ROUTES
104
  # ----------------------------------------------------------
 
99
 
100
  print(" Local files found.")
101
 
102
+ som_analyzer = SOMAnalyzer(
103
+ som_weights_path=som_weights_path,
104
+ background_data_path=background_data_path
105
+ )
106
+ print("✅ SOM Analyzer initialized successfully!")
107
+ SOM_AVAILABLE = True
108
+ except Exception as e:
109
+ print(f"⚠️ SOM Analyzer initialization failed: {e}")
110
+ print(" SOM analysis will be disabled")
111
+ else:
112
+ print(" SOM analysis disabled because 'som_analyzer.py' is missing.")
113
+
114
  # ----------------------------------------------------------
115
  # ROUTES
116
  # ----------------------------------------------------------