Spaces:
Runtime error
Runtime error
Commit
·
b31df7f
1
Parent(s):
fb647ca
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,8 @@ def load_image(url):
|
|
11 |
return image
|
12 |
|
13 |
def generate_image(prompt):
|
14 |
-
|
|
|
15 |
time.sleep(random.randint(10, 20))
|
16 |
faces = [
|
17 |
"https://avatars.mds.yandex.net/i?id=f9676dc9c99572353c509d298a0b9f6571edca4e-10514707-images-thumbs&n=13",
|
@@ -703,21 +704,22 @@ def generate_image(prompt):
|
|
703 |
output_url = random.choice(zombieland)
|
704 |
else:
|
705 |
return "No image generated."
|
|
|
706 |
image = load_image(output_url)
|
707 |
return image
|
708 |
|
709 |
iface = gr.Interface(
|
710 |
fn=generate_image,
|
711 |
-
inputs=gr.Textbox(lines=5, max_lines=6, label="Enter
|
712 |
outputs=gr.outputs.Image(label="Generated Image", type="pil"),
|
713 |
title="KVIImager 2.0 - Image Generator",
|
714 |
-
description="Generate images based on a prompt. Sorry from us, but it can don't understand
|
715 |
examples=[
|
716 |
["Realistic face, high-resolution, realistic, 4k, 8k, face, image"],
|
717 |
-
["Realistic image of beautiful landscape and mountains, 4k,
|
718 |
-
["Image of a
|
719 |
-
["Realistic avatar man standing in rainforest, 8k,
|
720 |
]
|
721 |
)
|
722 |
|
723 |
-
iface.launch()
|
|
|
11 |
return image
|
12 |
|
13 |
def generate_image(prompt):
|
14 |
+
prompt = prompt.lower()
|
15 |
+
|
16 |
time.sleep(random.randint(10, 20))
|
17 |
faces = [
|
18 |
"https://avatars.mds.yandex.net/i?id=f9676dc9c99572353c509d298a0b9f6571edca4e-10514707-images-thumbs&n=13",
|
|
|
704 |
output_url = random.choice(zombieland)
|
705 |
else:
|
706 |
return "No image generated."
|
707 |
+
|
708 |
image = load_image(output_url)
|
709 |
return image
|
710 |
|
711 |
iface = gr.Interface(
|
712 |
fn=generate_image,
|
713 |
+
inputs=gr.Textbox(lines=5, max_lines=6, label="Enter prompt"),
|
714 |
outputs=gr.outputs.Image(label="Generated Image", type="pil"),
|
715 |
title="KVIImager 2.0 - Image Generator",
|
716 |
+
description="Generate images based on a prompt. Sorry from us, but it can don't understand prompt carefully. It has 200 parameters. Please do not use capital letters because AI won't understand them and will give you an error. Get help: https://github.com/Vasiliy-katsyka/kviimager.",
|
717 |
examples=[
|
718 |
["Realistic face, high-resolution, realistic, 4k, 8k, face, image"],
|
719 |
+
["Realistic image of beautiful landscape and mountains, 4k, beautiful, realistic, landscape, AI, mountains"],
|
720 |
+
["Image of a Chinese crested with high details, 4k, realistic"],
|
721 |
+
["Realistic avatar man standing in rainforest, 8k, HD, detailed"]
|
722 |
]
|
723 |
)
|
724 |
|
725 |
+
iface.launch()
|