admin commited on
Commit
3d24d92
β€’
1 Parent(s): 268c281

fix map loc

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -102,7 +102,7 @@ def generate_music(
102
  vocab_size=128,
103
  )
104
  model = TunesFormer(patch_config, char_config, share_weights=SHARE_WEIGHTS)
105
- checkpoint = torch.load(weights, map_location=torch.device("cpu"))
106
  model.load_state_dict(checkpoint["model"])
107
  model = model.to(DEVICE)
108
  model.eval()
 
102
  vocab_size=128,
103
  )
104
  model = TunesFormer(patch_config, char_config, share_weights=SHARE_WEIGHTS)
105
+ checkpoint = torch.load(weights, map_location=DEVICE)
106
  model.load_state_dict(checkpoint["model"])
107
  model = model.to(DEVICE)
108
  model.eval()