vsrinivas commited on
Commit
05a9c7f
1 Parent(s): 36be87f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,8 +4,8 @@ import torch
4
  from diffusers import DiffusionPipeline
5
 
6
  def get_completion(prompt,params):
7
- return pipeline(prompt=prompt, height=params['height'], width=params['width'], num_inference_steps=int(params['num_inference_steps']), guidance_scale=params['guidance_scale'])['sample'][0]
8
-
9
  def generate(prompt,steps,guidance,width,height):
10
  params = {
11
  "num_inference_steps": steps,
 
4
  from diffusers import DiffusionPipeline
5
 
6
  def get_completion(prompt,params):
7
+ # return pipeline(prompt=prompt, height=params['height'], width=params['width'], num_inference_steps=int(params['num_inference_steps']), guidance_scale=params['guidance_scale'])['sample'][0]
8
+ return pipeline(prompt=prompt, height=params['height'], width=params['width'], num_inference_steps=int(params['num_inference_steps']), guidance_scale=params['guidance_scale']).images[0]
9
  def generate(prompt,steps,guidance,width,height):
10
  params = {
11
  "num_inference_steps": steps,