Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -301,7 +301,7 @@ def visualize(model, data, dims):
|
|
301 |
real_imgs = lab_to_rgb(L, real_color)
|
302 |
# img=cv.resize(fake_imgs[0], dsize=(dims[1], dims[0]), interpolation=cv.INTER_CUBIC)
|
303 |
img=fake_imgs[0]
|
304 |
-
return np.resize(img,(dims[1], dims[0]))
|
305 |
return fake_imgs[0]
|
306 |
for i in range(1):
|
307 |
# t_img = transforms.Resize((dims[0], dims[1]))(t_img)
|
@@ -376,7 +376,7 @@ description = "Gradio demo for Image Colorization project. You can give an image
|
|
376 |
gr.Interface(
|
377 |
main_func,
|
378 |
[gr.Image(type="filepath", label="Input Image") ],
|
379 |
-
[gr.Textbox(label="Image Size"),gr.Image(type="
|
380 |
title=title,
|
381 |
description=description,
|
382 |
# examples=[['a.png', ['Generate text']], ['b.png', ['Generate text','Summary','Important Sentences']], ]
|
|
|
301 |
real_imgs = lab_to_rgb(L, real_color)
|
302 |
# img=cv.resize(fake_imgs[0], dsize=(dims[1], dims[0]), interpolation=cv.INTER_CUBIC)
|
303 |
img=fake_imgs[0]
|
304 |
+
# return np.resize(img,(dims[1], dims[0]))
|
305 |
return fake_imgs[0]
|
306 |
for i in range(1):
|
307 |
# t_img = transforms.Resize((dims[0], dims[1]))(t_img)
|
|
|
376 |
gr.Interface(
|
377 |
main_func,
|
378 |
[gr.Image(type="filepath", label="Input Image") ],
|
379 |
+
[gr.Textbox(label="Image Size"),gr.Image(type="pil", label="Output Image")],
|
380 |
title=title,
|
381 |
description=description,
|
382 |
# examples=[['a.png', ['Generate text']], ['b.png', ['Generate text','Summary','Important Sentences']], ]
|