Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ def classify(review):
|
|
16 |
input_ids = token(review)['input_ids'][:512]
|
17 |
logits = inf_session.run([output_name],{input_name : [input_ids]})[0]
|
18 |
logits = torch.FloatTensor(logits)
|
19 |
-
|
20 |
x = 2
|
21 |
return dict(zip(classes,map(float,probs)))
|
22 |
|
|
|
16 |
input_ids = token(review)['input_ids'][:512]
|
17 |
logits = inf_session.run([output_name],{input_name : [input_ids]})[0]
|
18 |
logits = torch.FloatTensor(logits)
|
19 |
+
probs = torch.sigmoid(logits)[0]
|
20 |
x = 2
|
21 |
return dict(zip(classes,map(float,probs)))
|
22 |
|