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

see if model weights need torch load

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -29,8 +29,8 @@ N = 6
29
  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(hf_hub_download(repo_id="nickgardner/chatbot",
33
- filename="alpaca_train_380_epoch.pt"))
34
  model.eval()
35
 
36
  def respond(custom_string):
 
29
  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):