ash123 commited on
Commit
33ac871
1 Parent(s): 4f05a50

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -35,7 +35,7 @@ def generate_image(prompt: str, negative_prompt: str = "", inference_steps: int
35
  prompt_ids = shard(prompt_ids)
36
 
37
  if negative_prompt == "":
38
- image = pipeline(
39
  prompt_ids=prompt_ids,
40
  params=p_params,
41
  prng_seed=rng,
@@ -49,7 +49,7 @@ def generate_image(prompt: str, negative_prompt: str = "", inference_steps: int
49
  neg_prompt_ids = pipeline.prepare_inputs(
50
  [negative_prompt] * num_samples)
51
  neg_prompt_ids = shard(neg_prompt_ids)
52
- image = pipeline(
53
  prompt_ids=prompt_ids,
54
  params=p_params,
55
  prng_seed=rng,
@@ -62,7 +62,7 @@ def generate_image(prompt: str, negative_prompt: str = "", inference_steps: int
62
  ).images
63
  images = images.reshape((num_samples,) + images.shape[-3:])
64
  images = pipeline.numpy_to_pil(images)
65
- return image[0]
66
 
67
  examples = [
68
  ["A watercolor painting of a bird"],
 
35
  prompt_ids = shard(prompt_ids)
36
 
37
  if negative_prompt == "":
38
+ images = pipeline(
39
  prompt_ids=prompt_ids,
40
  params=p_params,
41
  prng_seed=rng,
 
49
  neg_prompt_ids = pipeline.prepare_inputs(
50
  [negative_prompt] * num_samples)
51
  neg_prompt_ids = shard(neg_prompt_ids)
52
+ images = pipeline(
53
  prompt_ids=prompt_ids,
54
  params=p_params,
55
  prng_seed=rng,
 
62
  ).images
63
  images = images.reshape((num_samples,) + images.shape[-3:])
64
  images = pipeline.numpy_to_pil(images)
65
+ return images[0]
66
 
67
  examples = [
68
  ["A watercolor painting of a bird"],