Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -33,11 +33,11 @@ def fig2img(fig):
|
|
33 |
fig.savefig(buf)
|
34 |
buf.seek(0)
|
35 |
pil_img = Image.open(buf)
|
36 |
-
basewidth = 750
|
37 |
-
wpercent = (basewidth/float(pil_img.size[0]))
|
38 |
-
hsize = int((float(pil_img.size[1])*float(wpercent)))
|
39 |
-
img = pil_img.resize((basewidth,hsize), Image.Resampling.LANCZOS)
|
40 |
-
return
|
41 |
|
42 |
|
43 |
def visualize_prediction(img, output_dict, threshold=0.5, id2label=None):
|
|
|
33 |
fig.savefig(buf)
|
34 |
buf.seek(0)
|
35 |
pil_img = Image.open(buf)
|
36 |
+
#basewidth = 750
|
37 |
+
#wpercent = (basewidth/float(pil_img.size[0]))
|
38 |
+
#hsize = int((float(pil_img.size[1])*float(wpercent)))
|
39 |
+
#img = pil_img.resize((basewidth,hsize), Image.Resampling.LANCZOS)
|
40 |
+
return pil_img
|
41 |
|
42 |
|
43 |
def visualize_prediction(img, output_dict, threshold=0.5, id2label=None):
|