Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -372,15 +372,14 @@ def main_func(filepath):
|
|
| 372 |
img2=np.resize(img,a)
|
| 373 |
img3=Image.fromarray(cv.resize(np.uint8(img), a, interpolation=cv.INTER_CUBIC))
|
| 374 |
img4=Image.fromarray(cv.resize(np.uint8(img), a, interpolation=cv.INTER_LINEAR))
|
| 375 |
-
return (size_text,img,img2,img3,
|
| 376 |
|
| 377 |
title = "Image Colorization"
|
| 378 |
description = "Gradio demo for Image Colorization project. You can give an image as input on the left side and then click on the submit button. The program would recolorize the 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"),"image",gr.Image( label="Output Image2"),
|
| 383 |
title=title,
|
| 384 |
description=description,
|
| 385 |
-
examples=[ ['face.jpg'], ['montains.jpg'],['tree.jpg'] ]
|
| 386 |
-
).launch(enable_queue=True)
|
|
|
|
| 372 |
img2=np.resize(img,a)
|
| 373 |
img3=Image.fromarray(cv.resize(np.uint8(img), a, interpolation=cv.INTER_CUBIC))
|
| 374 |
img4=Image.fromarray(cv.resize(np.uint8(img), a, interpolation=cv.INTER_LINEAR))
|
| 375 |
+
return (size_text,img,img2,img3,img4)
|
| 376 |
|
| 377 |
title = "Image Colorization"
|
| 378 |
description = "Gradio demo for Image Colorization project. You can give an image as input on the left side and then click on the submit button. The program would recolorize the 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"),"image",gr.Image( label="Output Image2"),"image"],
|
| 383 |
title=title,
|
| 384 |
description=description,
|
| 385 |
+
examples=[ ['face.jpg'], ['montains.jpg'],['tree.jpg'] ]
|
|
|