elapt1c commited on
Commit
30a56c5
·
verified ·
1 Parent(s): f710225

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -51,7 +51,7 @@ model = CustomDialoGPT(vocab_size, n_embd, n_head, n_layer)
51
  # Download and load model weights
52
  try:
53
  pth_filepath = hf_hub_download(repo_id=model_repo, filename=model_filename)
54
- checkpoint = torch.load(pth_filepath, map_location=device)
55
 
56
  # Handle different checkpoint saving formats if needed.
57
  # If your checkpoint is just the state_dict, load it directly.
 
51
  # Download and load model weights
52
  try:
53
  pth_filepath = hf_hub_download(repo_id=model_repo, filename=model_filename)
54
+ checkpoint = torch.load(pth_filepath, map_location=device, weights_only=True)
55
 
56
  # Handle different checkpoint saving formats if needed.
57
  # If your checkpoint is just the state_dict, load it directly.