Spaces:
Build error
Build error
EliottZemour
commited on
Commit
•
c0cf912
1
Parent(s):
2a2e9cb
aaa
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ def correlation_score(table, review):
|
|
28 |
# Compute the correlation score
|
29 |
args = ((table, review))
|
30 |
inputs = bert_tokenizer(*args, padding=True, max_length=128, truncation=True, return_tensors="pt")
|
31 |
-
logits =
|
32 |
probs = logits.softmax(dim=-1)
|
33 |
return {
|
34 |
"correlation": probs[:, 1].item()
|
|
|
28 |
# Compute the correlation score
|
29 |
args = ((table, review))
|
30 |
inputs = bert_tokenizer(*args, padding=True, max_length=128, truncation=True, return_tensors="pt")
|
31 |
+
logits = bert_model(**inputs).logits
|
32 |
probs = logits.softmax(dim=-1)
|
33 |
return {
|
34 |
"correlation": probs[:, 1].item()
|