liljacharlotte commited on
Commit
d0aced2
·
verified ·
1 Parent(s): af00698

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -30,7 +30,7 @@ with torch.no_grad():
30
 
31
  # Get predictions
32
  threshold = 0.5
33
- probs = torch.sigmoid(outputs.logits)
34
  predictions = [model.config.id2label[i] for i, prob in enumerate(probs) if prob > threshold]
35
  print(predictions)
36
  # -> ['ppr_pos', 'wtp_neg'] (patient-provider/staff relationships:positive, waiting time for appointment:negative)
 
30
 
31
  # Get predictions
32
  threshold = 0.5
33
+ probs = torch.sigmoid(outputs.logits).squeeze()
34
  predictions = [model.config.id2label[i] for i, prob in enumerate(probs) if prob > threshold]
35
  print(predictions)
36
  # -> ['ppr_pos', 'wtp_neg'] (patient-provider/staff relationships:positive, waiting time for appointment:negative)