Spaces:
Runtime error
Runtime error
Changed probability calculation by removing the extra softmax function
Browse files
app.py
CHANGED
@@ -16,8 +16,8 @@ def predictScore(abstract):
|
|
16 |
outputs = model(inputs['input_ids'], attention_mask=inputs['attention_mask'])
|
17 |
scores = torch.softmax(outputs.logits, dim=1)[0]
|
18 |
|
19 |
-
|
20 |
-
accept_prob =
|
21 |
print(accept_prob)
|
22 |
|
23 |
return accept_prob
|
|
|
16 |
outputs = model(inputs['input_ids'], attention_mask=inputs['attention_mask'])
|
17 |
scores = torch.softmax(outputs.logits, dim=1)[0]
|
18 |
|
19 |
+
print(f"scores:{scores}")
|
20 |
+
accept_prob = scores[0].item()
|
21 |
print(accept_prob)
|
22 |
|
23 |
return accept_prob
|