nickgardner commited on
Commit
304e451
1 Parent(s): 55360ff
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -47,8 +47,7 @@ def respond(custom_string):
47
 
48
  out = model.out(model.decoder(outputs[:i].unsqueeze(0), e_outputs, src_mask, trg_mask))
49
  out = torch.nn.functional.softmax(out, dim=-1).detach()
50
- print(out)
51
- ix = np.random.choice(np.arange(out), 1, p=out)
52
  # val, ix = out[:, -1].data.topk(1)
53
 
54
  outputs[i] = ix[0][0]
 
47
 
48
  out = model.out(model.decoder(outputs[:i].unsqueeze(0), e_outputs, src_mask, trg_mask))
49
  out = torch.nn.functional.softmax(out, dim=-1).detach()
50
+ ix = np.random.choice(np.arange(out[:, -1]), 1, p=out[:, -1])
 
51
  # val, ix = out[:, -1].data.topk(1)
52
 
53
  outputs[i] = ix[0][0]