debisoft commited on
Commit
cf87232
·
1 Parent(s): d251c5d
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -3,7 +3,7 @@ import gradio as gr
3
  from huggan.pytorch.pix2pix.modeling_pix2pix import GeneratorUNet
4
  from PIL import Image
5
  from torchvision.utils import save_image
6
- from torchvision.transforms import Compose, Resize, ToTensor, Normalize, ToPilImage
7
  from diffusers.utils import load_image, make_image_grid
8
 
9
  transform = Compose(
@@ -22,7 +22,7 @@ def greet(input):
22
  pixel_values = transform(image).unsqueeze(0)
23
  output = generator(pixel_values)
24
 
25
- return ToPilImage(output)
26
 
27
  iface = gr.Interface(fn=greet, inputs=[gr.Textbox(label="coord_zxy", value="/18/73237/95677")], outputs=[gr.Image(type="pil", width=256, label="Output Image")])
28
 
 
3
  from huggan.pytorch.pix2pix.modeling_pix2pix import GeneratorUNet
4
  from PIL import Image
5
  from torchvision.utils import save_image
6
+ from torchvision.transforms import Compose, Resize, ToTensor, Normalize, ToPILImage
7
  from diffusers.utils import load_image, make_image_grid
8
 
9
  transform = Compose(
 
22
  pixel_values = transform(image).unsqueeze(0)
23
  output = generator(pixel_values)
24
 
25
+ return ToPILImage(output)
26
 
27
  iface = gr.Interface(fn=greet, inputs=[gr.Textbox(label="coord_zxy", value="/18/73237/95677")], outputs=[gr.Image(type="pil", width=256, label="Output Image")])
28