Spaces:
Sleeping
Sleeping
jioji0
commited on
Commit
•
7e6a221
1
Parent(s):
ff15c99
im size
Browse files
app.py
CHANGED
@@ -97,9 +97,13 @@ def sepia(input_img):
|
|
97 |
fig = draw_plot(pred_img, seg)
|
98 |
return fig
|
99 |
|
|
|
|
|
|
|
|
|
100 |
demo = gr.Interface(fn=sepia,
|
101 |
#inputs=gr.Image(shape=(1024, 1024)),
|
102 |
-
inputs=gr.Image(type='pil',
|
103 |
outputs=['plot'],
|
104 |
examples=["city-1c.jpg"],
|
105 |
allow_flagging='never')
|
|
|
97 |
fig = draw_plot(pred_img, seg)
|
98 |
return fig
|
99 |
|
100 |
+
def proc_img(img):
|
101 |
+
img = img.resize((1024,1024))
|
102 |
+
return img
|
103 |
+
|
104 |
demo = gr.Interface(fn=sepia,
|
105 |
#inputs=gr.Image(shape=(1024, 1024)),
|
106 |
+
inputs=gr.Image(type='pil', prepeocessing_function=proc_img),
|
107 |
outputs=['plot'],
|
108 |
examples=["city-1c.jpg"],
|
109 |
allow_flagging='never')
|