Spaces:
Build error
Build error
jiangjiechen
commited on
Commit
•
f06b351
1
Parent(s):
66eb2db
fix premise
Browse files- src/loren.py +2 -3
src/loren.py
CHANGED
@@ -57,12 +57,11 @@ class Loren:
|
|
57 |
label = id2label[y_predicted[0]]
|
58 |
|
59 |
# Update js
|
60 |
-
js
|
61 |
js['evidence'] = [self.fc_client.tokenizer.clean_up_tokenization(e[2]) for e in js['evidence']]
|
62 |
js['questions'] = [self.fc_client.tokenizer.clean_up_tokenization(q) for q in js['questions']]
|
63 |
js['claim_phrases'] = [self.fc_client.tokenizer.clean_up_tokenization(a[0]) for a in js['answers']]
|
64 |
-
js['local_premises'] = [
|
65 |
-
for aa in js['local_premises']]
|
66 |
# js['m_attn'] = m_attn[0][:len(js['claim_phrases'])]
|
67 |
js['phrase_veracity'] = z_predicted[0][:len(js['claim_phrases'])]
|
68 |
js['claim_veracity'] = label
|
|
|
57 |
label = id2label[y_predicted[0]]
|
58 |
|
59 |
# Update js
|
60 |
+
js = assemble_answers_to_one(js, k=1)
|
61 |
js['evidence'] = [self.fc_client.tokenizer.clean_up_tokenization(e[2]) for e in js['evidence']]
|
62 |
js['questions'] = [self.fc_client.tokenizer.clean_up_tokenization(q) for q in js['questions']]
|
63 |
js['claim_phrases'] = [self.fc_client.tokenizer.clean_up_tokenization(a[0]) for a in js['answers']]
|
64 |
+
js['local_premises'] = [self.fc_client.tokenizer.clean_up_tokenization(a) for a in js['evidential_assembled']]
|
|
|
65 |
# js['m_attn'] = m_attn[0][:len(js['claim_phrases'])]
|
66 |
js['phrase_veracity'] = z_predicted[0][:len(js['claim_phrases'])]
|
67 |
js['claim_veracity'] = label
|