PedroMartelleto commited on
Commit
2134128
1 Parent(s): 3a35229

Deploying to HF

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -48,7 +48,7 @@ class Explainer:
48
 
49
  def convert_fig_to_pil(self, fig):
50
  fig.canvas.draw()
51
- data = np.frombuffer(fig.canvas.tostring_rgb(), dtype=np.uint8)
52
  data = data.reshape(fig.canvas.get_width_height()[::-1] + (3,))
53
  return PIL.Image.fromarray(data)
54
 
 
48
 
49
  def convert_fig_to_pil(self, fig):
50
  fig.canvas.draw()
51
+ data = np.fromstring(fig.canvas.tostring_rgb(), dtype=np.uint8, sep='')
52
  data = data.reshape(fig.canvas.get_width_height()[::-1] + (3,))
53
  return PIL.Image.fromarray(data)
54