Spaces:
Build error
Build error
EliottZemour
commited on
Commit
•
7517145
1
Parent(s):
c0cf912
correlation
Browse files
app.py
CHANGED
@@ -31,7 +31,8 @@ def correlation_score(table, review):
|
|
31 |
logits = bert_model(**inputs).logits
|
32 |
probs = logits.softmax(dim=-1)
|
33 |
return {
|
34 |
-
"
|
|
|
35 |
}
|
36 |
|
37 |
def create_prompt(stars, useful, funny, cool):
|
|
|
31 |
logits = bert_model(**inputs).logits
|
32 |
probs = logits.softmax(dim=-1)
|
33 |
return {
|
34 |
+
"correlated": probs[:, 1].item(),
|
35 |
+
"uncorrelated": probs[:, 0].item()
|
36 |
}
|
37 |
|
38 |
def create_prompt(stars, useful, funny, cool):
|