valhalla HF staff commited on
Commit
929245f
1 Parent(s): 8ba29f7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -56,7 +56,7 @@ def get_images(batch: th.Tensor):
56
  """ Display a batch of images inline. """
57
  scaled = ((batch + 1)*127.5).round().clamp(0,255).to(th.uint8).cpu()
58
  reshaped = scaled.permute(2, 0, 3, 1).reshape([batch.shape[2], -1, 3])
59
- Image.fromarray(reshaped.numpy())
60
 
61
 
62
  # Create a classifier-free guidance sampling function
@@ -182,8 +182,8 @@ def to_base64(pil_image):
182
 
183
  title = "Interactive demo: glide-text2im"
184
  description = "Demo for OpenAI's GLIDE: Towards Photorealistic Image Generation and Editing with Text-Guided Diffusion Models."
185
- article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2109.10282'>GLIDE: Towards Photorealistic Image Generation and Editing with Text-Guided Diffusion Models</a> | <a href='https://openai.com/blog/image-gpt/'>Official blog</a></p>"
186
- examples =["Eiffel tower"]
187
 
188
  iface = gr.Interface(fn=sample,
189
  inputs=gr.inputs.Textbox(label='What would you like to see?'),
56
  """ Display a batch of images inline. """
57
  scaled = ((batch + 1)*127.5).round().clamp(0,255).to(th.uint8).cpu()
58
  reshaped = scaled.permute(2, 0, 3, 1).reshape([batch.shape[2], -1, 3])
59
+ return Image.fromarray(reshaped.numpy())
60
 
61
 
62
  # Create a classifier-free guidance sampling function
182
 
183
  title = "Interactive demo: glide-text2im"
184
  description = "Demo for OpenAI's GLIDE: Towards Photorealistic Image Generation and Editing with Text-Guided Diffusion Models."
185
+ article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2112.10741'>GLIDE: Towards Photorealistic Image Generation and Editing with Text-Guided Diffusion Models</a> | <a href='https://github.com/openai/glide-text2im/'>Official Repo</a></p>"
186
+ examples =["an oil painting of a corgi"]
187
 
188
  iface = gr.Interface(fn=sample,
189
  inputs=gr.inputs.Textbox(label='What would you like to see?'),