Spaces:
Runtime error
Runtime error
update app
Browse files
app.py
CHANGED
@@ -25,12 +25,12 @@ image = pipeline(prompt, num_inference_steps=50).images[0]
|
|
25 |
def infer(prompt, negative_prompt, guidance_scale=10, num_inference_steps=50):
|
26 |
neg = negative_prompt if negative_prompt else None
|
27 |
imgs = []
|
28 |
-
while len(imgs) !=
|
29 |
next_prompt = pipeline(prompt, negative_prompt=neg, guidance_scale=guidance_scale, num_inference_steps=num_inference_steps, num_images_per_prompt=5)
|
30 |
for img, is_neg in zip(next_prompt.images, next_prompt.nsfw_content_detected):
|
31 |
if not is_neg:
|
32 |
imgs.append(img)
|
33 |
-
if len(imgs) ==
|
34 |
break
|
35 |
|
36 |
return imgs
|
@@ -41,9 +41,9 @@ output = gr.Gallery(label="Outputs").style(grid=(1,2))
|
|
41 |
title = "KerasCV Stable Diffusion Demo on images of Bored Apes."
|
42 |
description = "This is a dreambooth model fine-tuned on images the NFT collection of the Bored Ape Yacht Club. To try it, input the concept with `drawbayc ape`."
|
43 |
examples=[
|
44 |
-
["A drawing of a drawbayc ape as a cowboy", "", 12,
|
45 |
-
["A drawing of a drawbayc ape as a clown", "", 12,
|
46 |
-
["A drawing of a drawbayc ape as a turtle", "", 12,
|
47 |
|
48 |
]
|
49 |
|
@@ -52,8 +52,6 @@ base_14 = "https://huggingface.co/nielsgl/dreambooth-bored-ape/resolve/main/"
|
|
52 |
model_card_1 = f"""
|
53 |
# KerasCV Stable Diffusion in Diffusers 🧨🤗
|
54 |
|
55 |
-
# KerasCV Stable Diffusion in Diffusers 🧨🤗
|
56 |
-
|
57 |
DreamBooth model for the `drawbayc ape` concept trained by nielsgl on the `nielsgl/bayc-tiny` dataset, images from this [Kaggle dataset](https://www.kaggle.com/datasets/stanleyjzheng/bored-apes-yacht-club).
|
58 |
It can be used by modifying the `instance_prompt`: **a drawing of drawbayc ape**
|
59 |
|
|
|
25 |
def infer(prompt, negative_prompt, guidance_scale=10, num_inference_steps=50):
|
26 |
neg = negative_prompt if negative_prompt else None
|
27 |
imgs = []
|
28 |
+
while len(imgs) != 4:
|
29 |
next_prompt = pipeline(prompt, negative_prompt=neg, guidance_scale=guidance_scale, num_inference_steps=num_inference_steps, num_images_per_prompt=5)
|
30 |
for img, is_neg in zip(next_prompt.images, next_prompt.nsfw_content_detected):
|
31 |
if not is_neg:
|
32 |
imgs.append(img)
|
33 |
+
if len(imgs) == 4:
|
34 |
break
|
35 |
|
36 |
return imgs
|
|
|
41 |
title = "KerasCV Stable Diffusion Demo on images of Bored Apes."
|
42 |
description = "This is a dreambooth model fine-tuned on images the NFT collection of the Bored Ape Yacht Club. To try it, input the concept with `drawbayc ape`."
|
43 |
examples=[
|
44 |
+
["A drawing of a drawbayc ape as a cowboy", "", 12, 75],
|
45 |
+
["A drawing of a drawbayc ape as a clown", "", 12, 75],
|
46 |
+
["A drawing of a drawbayc ape as a turtle", "", 12, 75],
|
47 |
|
48 |
]
|
49 |
|
|
|
52 |
model_card_1 = f"""
|
53 |
# KerasCV Stable Diffusion in Diffusers 🧨🤗
|
54 |
|
|
|
|
|
55 |
DreamBooth model for the `drawbayc ape` concept trained by nielsgl on the `nielsgl/bayc-tiny` dataset, images from this [Kaggle dataset](https://www.kaggle.com/datasets/stanleyjzheng/bored-apes-yacht-club).
|
56 |
It can be used by modifying the `instance_prompt`: **a drawing of drawbayc ape**
|
57 |
|