Dzhamb commited on
Commit
fca33ac
1 Parent(s): 36f1984

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +1 -1
utils.py CHANGED
@@ -16,7 +16,7 @@ def get_text(title: str, abstract: str):
16
  def get_labels(text, model, tokenizer, count_labels=8):
17
  tokens = tokenizer(text, return_tensors='pt')
18
  outputs = model(**tokens)
19
- probs = torch.nn.Softmax(dim=1)(outputs.logits)
20
 
21
  labels = ['Computer_science', 'Economics',
22
  'Electrical_Engineering_and_Systems_Science', 'Mathematics',
 
16
  def get_labels(text, model, tokenizer, count_labels=8):
17
  tokens = tokenizer(text, return_tensors='pt')
18
  outputs = model(**tokens)
19
+ probs = torch.nn.Softmax()(outputs.logits)
20
 
21
  labels = ['Computer_science', 'Economics',
22
  'Electrical_Engineering_and_Systems_Science', 'Mathematics',