Балаганский Никита Николаевич commited on
Commit
23b915b
1 Parent(s): 70a1745

layout fix

Browse files
Files changed (1) hide show
  1. generator.py +5 -2
generator.py CHANGED
@@ -67,7 +67,9 @@ class Generator:
67
  "title": "Desired Attribute"
68
  },
69
  "plot_bgcolor": '#FFFFFF',
70
- "template": "plotly_white"
 
 
71
  })
72
  for i in range(max_length):
73
  is_caif_step = (
@@ -94,7 +96,8 @@ class Generator:
94
  gen_history += [probs]
95
  scatter_data = go.Scatter({
96
  "x": list(range(len(gen_history))),
97
- "y": gen_history
 
98
  })
99
  fig = go.Figure([scatter_data], layout=layout)
100
  plot.plotly_chart(fig, use_container_width=True)
 
67
  "title": "Desired Attribute"
68
  },
69
  "plot_bgcolor": '#FFFFFF',
70
+ "template": "plotly_white",
71
+ "hovermode": "x",
72
+
73
  })
74
  for i in range(max_length):
75
  is_caif_step = (
 
96
  gen_history += [probs]
97
  scatter_data = go.Scatter({
98
  "x": list(range(len(gen_history))),
99
+ "y": gen_history,
100
+ "hovertext": [self.tokenizer.decode(t) for t in input_ids[0]]
101
  })
102
  fig = go.Figure([scatter_data], layout=layout)
103
  plot.plotly_chart(fig, use_container_width=True)