Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -47,7 +47,7 @@ def analyze_sentence(index, vis_type, vis_format):
|
|
47 |
"words": [{"text": x, "tag": "N/A"} for x in tokenized[1:]],
|
48 |
"arcs": [{"start": j, "end": i, "label": "{:.2f}".format(plot_data[i, j]),
|
49 |
"dir": "right"}
|
50 |
-
for i in range(len(tokenized)-1) for j in range(i) if plot_data[i, j]
|
51 |
]
|
52 |
}]
|
53 |
graph_output = displacy.render(ex, style="dep", manual=True)
|
|
|
47 |
"words": [{"text": x, "tag": "N/A"} for x in tokenized[1:]],
|
48 |
"arcs": [{"start": j, "end": i, "label": "{:.2f}".format(plot_data[i, j]),
|
49 |
"dir": "right"}
|
50 |
+
for i in range(len(tokenized)-1) for j in range(i) if plot_data[i, j] > 0.5
|
51 |
]
|
52 |
}]
|
53 |
graph_output = displacy.render(ex, style="dep", manual=True)
|