Spaces:
Runtime error
Runtime error
revert last small fix (not necessary)
Browse files
app.py
CHANGED
@@ -53,8 +53,8 @@ def call(sentence, layers, detection_threshold):
|
|
53 |
pretty_qa_output = "\n".join(all_qas)
|
54 |
|
55 |
# also present highlighted predicates
|
56 |
-
qasrl_predicates = [
|
57 |
-
qanom_predicates = [
|
58 |
def color(idx):
|
59 |
if idx in qasrl_predicates : return "aquamarine"
|
60 |
if idx in qanom_predicates : return "aqua"
|
|
|
53 |
pretty_qa_output = "\n".join(all_qas)
|
54 |
|
55 |
# also present highlighted predicates
|
56 |
+
qasrl_predicates = [pred_info['predicate_idx'] for pred_info in outputs['qasrl']]
|
57 |
+
qanom_predicates = [pred_info['predicate_idx'] for pred_info in outputs['qanom']]
|
58 |
def color(idx):
|
59 |
if idx in qasrl_predicates : return "aquamarine"
|
60 |
if idx in qanom_predicates : return "aqua"
|