SMD00 commited on
Commit
c46026d
·
1 Parent(s): 8252a00

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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=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"
@@ -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","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'] ]