Spaces:
Runtime error
Runtime error
PedroMartelleto
commited on
Commit
•
3a35229
1
Parent(s):
19010f0
Deploying to HF
Browse files
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.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 |
|