Update app.py
Browse files
app.py
CHANGED
|
@@ -60,9 +60,8 @@ def plot_outlines(img, masks):
|
|
| 60 |
#fig.clf()
|
| 61 |
#plt.close(fig)
|
| 62 |
|
| 63 |
-
img = plt.gcf()
|
| 64 |
buf = io.BytesIO()
|
| 65 |
-
|
| 66 |
buf.seek(0)
|
| 67 |
output_pil_img = Image.open(buf)
|
| 68 |
return output_pil_img
|
|
|
|
| 60 |
#fig.clf()
|
| 61 |
#plt.close(fig)
|
| 62 |
|
|
|
|
| 63 |
buf = io.BytesIO()
|
| 64 |
+
fig.savefig(buf, bbox_inches='tight')
|
| 65 |
buf.seek(0)
|
| 66 |
output_pil_img = Image.open(buf)
|
| 67 |
return output_pil_img
|