NonSittinon commited on
Commit
78de4b9
·
verified ·
1 Parent(s): 0bbc82c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -28,7 +28,8 @@ model_hubert = HubertModel.from_pretrained(model_name)
28
  model_hubert.eval()
29
 
30
  # 3️⃣ โหลด classifier ที่ fine-tune แล้ว
31
- state_dict = torch.load("classifier.pt", map_location="cpu")
 
32
  model_cls.eval()
33
 
34
  # 4️⃣ โหลด scaler
 
28
  model_hubert.eval()
29
 
30
  # 3️⃣ โหลด classifier ที่ fine-tune แล้ว
31
+ model_cls = PlantSoundClassifier()
32
+ state_dict = torch.load("classifier.pt", map_location="cpu",weights_only=False )
33
  model_cls.eval()
34
 
35
  # 4️⃣ โหลด scaler