Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -370,8 +370,8 @@ def main_func(filepath):
|
|
| 370 |
model.optimize()
|
| 371 |
img=visualize(model, data, a)
|
| 372 |
img2=Image.fromarray(np.resize(img,a))
|
| 373 |
-
img3=
|
| 374 |
-
img4=
|
| 375 |
return (size_text,img,img2,img3,img4)
|
| 376 |
|
| 377 |
title = "Image Colorization"
|
|
@@ -379,7 +379,7 @@ description = "Gradio demo for Image Colorization project. You can give an image
|
|
| 379 |
gr.Interface(
|
| 380 |
main_func,
|
| 381 |
[gr.Image(type="filepath", label="Input Image") ],
|
| 382 |
-
[gr.Textbox(label="Image Size"),gr.Image(type="pil", label="Output Image"),gr.Image( label="Output Image2"),"image"
|
| 383 |
title=title,
|
| 384 |
description=description,
|
| 385 |
examples=[ ['face.jpg'], ['montains.jpg'],['tree.jpg'] ]
|
|
|
|
| 370 |
model.optimize()
|
| 371 |
img=visualize(model, data, a)
|
| 372 |
img2=Image.fromarray(np.resize(img,a))
|
| 373 |
+
img3=cv.resize(np.uint8(img), a, interpolation=cv.INTER_CUBIC)
|
| 374 |
+
img4=cv.resize(np.uint8(img), a, interpolation=cv.INTER_LINEAR)
|
| 375 |
return (size_text,img,img2,img3,img4)
|
| 376 |
|
| 377 |
title = "Image Colorization"
|
|
|
|
| 379 |
gr.Interface(
|
| 380 |
main_func,
|
| 381 |
[gr.Image(type="filepath", label="Input Image") ],
|
| 382 |
+
[gr.Textbox(label="Image Size"),gr.Image(type="pil", label="Output Image"),"image",gr.Image( label="Output Image2"),"image"],
|
| 383 |
title=title,
|
| 384 |
description=description,
|
| 385 |
examples=[ ['face.jpg'], ['montains.jpg'],['tree.jpg'] ]
|