dar-tau commited on
Commit
f82263a
·
verified ·
1 Parent(s): 6417c8b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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] < 0.5
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)