Spaces:
Runtime error
Runtime error
Update inductor.py
Browse files- inductor.py +1 -1
inductor.py
CHANGED
@@ -96,7 +96,7 @@ class BartInductor(object):
|
|
96 |
ret = [t[0].replace('<ent0>','<mask>').replace('<ent1>','<mask>') for t in tB_probs]
|
97 |
new_ret = []
|
98 |
for temp in ret:
|
99 |
-
temp = self.clean(temp
|
100 |
if len(new_ret) < topk and temp not in new_ret:
|
101 |
new_ret.append(temp)
|
102 |
|
|
|
96 |
ret = [t[0].replace('<ent0>','<mask>').replace('<ent1>','<mask>') for t in tB_probs]
|
97 |
new_ret = []
|
98 |
for temp in ret:
|
99 |
+
temp = self.clean(temp.strip())
|
100 |
if len(new_ret) < topk and temp not in new_ret:
|
101 |
new_ret.append(temp)
|
102 |
|