nickgardner commited on
Commit
db804d4
1 Parent(s): 952f87e

change load device

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -30,7 +30,7 @@ src_vocab = len(vocab)
30
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
31
  model = Transformer(len(vocab), len(vocab), d_model, N, heads).to(device)
32
  model.load_state_dict(torch.load(hf_hub_download(repo_id="nickgardner/chatbot",
33
- filename="alpaca_train_380_epoch.pt")))
34
  model.eval()
35
 
36
  def respond(custom_string):
 
30
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
31
  model = Transformer(len(vocab), len(vocab), d_model, N, heads).to(device)
32
  model.load_state_dict(torch.load(hf_hub_download(repo_id="nickgardner/chatbot",
33
+ filename="alpaca_train_380_epoch.pt"), map_location=device))
34
  model.eval()
35
 
36
  def respond(custom_string):