dar-tau commited on
Commit
087b132
·
verified ·
1 Parent(s): bcdaaf5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -44,8 +44,8 @@ def analyze_sentence(index, vis_type, vis_format):
44
  fig_output, graph_output = fig, ""
45
  else:
46
  ex = [{
47
- "words": [{"text": x} for x in tokenized],
48
- "arcs": [{"start": j, "end": i} for i in range(len(tokenized)) for j in range(i)]
49
  }]
50
  graph_output = displacy.render(ex, style="dep", manual=True)
51
  fig_output = None
 
44
  fig_output, graph_output = fig, ""
45
  else:
46
  ex = [{
47
+ "words": [{"text": x} for x in tokenized[1:]],
48
+ "arcs": [{"start": j, "end": i, "label": plot_data[i, j]} for i in range(len(tokenized)-1) for j in range(i)]
49
  }]
50
  graph_output = displacy.render(ex, style="dep", manual=True)
51
  fig_output = None