Spaces:
Paused
Paused
johann-foerster
commited on
Commit
·
4ced464
1
Parent(s):
c5aa8f3
it's easter!
Browse files- modules/sdxl_styles.py +36 -36
- webui.py +19 -19
modules/sdxl_styles.py
CHANGED
@@ -3,182 +3,182 @@
|
|
3 |
styles = [
|
4 |
{
|
5 |
"name": "Kinofilm",
|
6 |
-
"prompt": "(((
|
7 |
"negative_prompt": "anime, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured"
|
8 |
},
|
9 |
{
|
10 |
"name": "Anime",
|
11 |
-
"prompt": "(((
|
12 |
"negative_prompt": "photo, deformed, black and white, realism, disfigured, low contrast"
|
13 |
},
|
14 |
{
|
15 |
"name": "Ton",
|
16 |
-
"prompt": "(((
|
17 |
"negative_prompt": "sloppy, messy, grainy, highly detailed, ultra textured, photo"
|
18 |
},
|
19 |
{
|
20 |
"name": "Linienkunst",
|
21 |
-
"prompt": "(((
|
22 |
"negative_prompt": "anime, photorealistic, 35mm film, deformed, glitch, blurry, noisy, off-center, deformed, cross-eyed, closed eyes, bad anatomy, ugly, disfigured, mutated, realism, realistic, impressionism, expressionism, oil, acrylic"
|
23 |
},
|
24 |
{
|
25 |
"name": "Low Poly",
|
26 |
-
"prompt": "(((
|
27 |
"negative_prompt": "noisy, sloppy, messy, grainy, highly detailed, ultra textured, photo"
|
28 |
},
|
29 |
{
|
30 |
"name": "Origami",
|
31 |
-
"prompt": "(((
|
32 |
"negative_prompt": "noisy, sloppy, messy, grainy, highly detailed, ultra textured, photo"
|
33 |
},
|
34 |
{
|
35 |
"name": "Plakat",
|
36 |
-
"prompt": "(((
|
37 |
"negative_prompt": "noisy, blurry, amateurish, sloppy, unattractive"
|
38 |
},
|
39 |
{
|
40 |
"name": "Fahrzeug/Auto",
|
41 |
-
"prompt": "(((
|
42 |
"negative_prompt": "noisy, blurry, unattractive, sloppy, unprofessional"
|
43 |
},
|
44 |
{
|
45 |
"name": "Mode",
|
46 |
-
"prompt": "(((
|
47 |
"negative_prompt": "outdated, blurry, noisy, unattractive, sloppy"
|
48 |
},
|
49 |
{
|
50 |
"name": "Pixelkunst",
|
51 |
-
"prompt": "(((
|
52 |
"negative_prompt": "sloppy, messy, blurry, noisy, highly detailed, ultra textured, photo, realistic"
|
53 |
},
|
54 |
{
|
55 |
"name": "Abstrakt",
|
56 |
-
"prompt": "(((
|
57 |
"negative_prompt": "realistic, photorealistic, low contrast, plain, simple, monochrome"
|
58 |
},
|
59 |
{
|
60 |
"name": "Graffiti",
|
61 |
-
"prompt": "(((
|
62 |
"negative_prompt": "ugly, deformed, noisy, blurry, low contrast, realism, photorealistic"
|
63 |
},
|
64 |
{
|
65 |
"name": "Psychedelisch",
|
66 |
-
"prompt": "(((
|
67 |
"negative_prompt": "monochrome, black and white, low contrast, realistic, photorealistic, plain, simple"
|
68 |
},
|
69 |
{
|
70 |
"name": "Steampunk",
|
71 |
-
"prompt": "(((
|
72 |
"negative_prompt": "deformed, glitch, noisy, low contrast, anime, photorealistic"
|
73 |
},
|
74 |
{
|
75 |
"name": "Aquarell",
|
76 |
-
"prompt": "(((
|
77 |
"negative_prompt": "anime, photorealistic, 35mm film, deformed, glitch, low contrast, noisy"
|
78 |
},
|
79 |
{
|
80 |
"name": "Cyberpunk-Stadt",
|
81 |
-
"prompt": "(((
|
82 |
"negative_prompt": "natural, rural, deformed, low contrast, black and white, sketch, watercolor"
|
83 |
},
|
84 |
{
|
85 |
"name": "Cyberpunk-Spiel",
|
86 |
-
"prompt": "(((
|
87 |
"negative_prompt": "historical, natural, rustic, low detailed"
|
88 |
},
|
89 |
{
|
90 |
"name": "Mario",
|
91 |
-
"prompt": "(((
|
92 |
"negative_prompt": "realistic, modern, horror, dystopian, violent"
|
93 |
},
|
94 |
{
|
95 |
"name": "Minecraft",
|
96 |
-
"prompt": "(((
|
97 |
"negative_prompt": "smooth, realistic, detailed, photorealistic, noise, blurry, deformed"
|
98 |
},
|
99 |
{
|
100 |
"name": "Strategiespiel",
|
101 |
-
"prompt": "(((
|
102 |
"negative_prompt": "first-person view, modern, photorealistic"
|
103 |
},
|
104 |
{
|
105 |
"name": "Dystopisch",
|
106 |
-
"prompt": "(((
|
107 |
"negative_prompt": "ugly, deformed, noisy, blurry, low contrast, cheerful, optimistic, vibrant, colorful"
|
108 |
},
|
109 |
{
|
110 |
"name": "Märchen",
|
111 |
-
"prompt": "(((
|
112 |
"negative_prompt": "realistic, modern, ordinary, mundane"
|
113 |
},
|
114 |
{
|
115 |
"name": "Gotisch",
|
116 |
-
"prompt": "(((
|
117 |
"negative_prompt": "ugly, deformed, noisy, blurry, low contrast, realism, photorealistic, cheerful, optimistic"
|
118 |
},
|
119 |
{
|
120 |
"name": "Metropole",
|
121 |
-
"prompt": "(((
|
122 |
"negative_prompt": "rural, natural, rustic, historical, simple"
|
123 |
},
|
124 |
{
|
125 |
"name": "Monochrom",
|
126 |
-
"prompt": "(((
|
127 |
"negative_prompt": "colorful, vibrant, noisy, blurry, deformed"
|
128 |
},
|
129 |
{
|
130 |
"name": "Weltraum",
|
131 |
-
"prompt": "(((
|
132 |
"negative_prompt": "earthly, mundane, ground-based, realism"
|
133 |
},
|
134 |
{
|
135 |
"name": "Buntglas",
|
136 |
-
"prompt": "(((
|
137 |
"negative_prompt": "ugly, deformed, noisy, blurry, low contrast, realism, photorealistic"
|
138 |
},
|
139 |
{
|
140 |
"name": "Stammeskunst",
|
141 |
-
"prompt": "(((
|
142 |
"negative_prompt": "modern, futuristic, minimalist, pastel"
|
143 |
},
|
144 |
{
|
145 |
"name": "Zentangle",
|
146 |
-
"prompt": "(((
|
147 |
"negative_prompt": "colorful, representative, simplistic, large fields of color"
|
148 |
},
|
149 |
{
|
150 |
"name": "Kirigami",
|
151 |
-
"prompt": "(((
|
152 |
"negative_prompt": "painting, drawing, 2D, noisy, blurry, deformed"
|
153 |
},
|
154 |
{
|
155 |
"name": "Papiermaché",
|
156 |
-
"prompt": "(((
|
157 |
"negative_prompt": "2D, flat, photo, sketch, digital art, deformed, noisy, blurry"
|
158 |
},
|
159 |
{
|
160 |
"name": "Papierkräuseln",
|
161 |
-
"prompt": "(((
|
162 |
"negative_prompt": "photo, painting, drawing, 2D, flat, deformed, noisy, blurry"
|
163 |
},
|
164 |
{
|
165 |
"name": "Scherenschnitt-Schattenbox",
|
166 |
-
"prompt": "(((
|
167 |
"negative_prompt": "painting, drawing, photo, 2D, flat, high detail, blurry, noisy, disfigured"
|
168 |
},
|
169 |
{
|
170 |
"name": "Gestapelte Scherenschnitte",
|
171 |
-
"prompt": "(((
|
172 |
"negative_prompt": "2D, flat, noisy, blurry, painting, drawing, photo, deformed"
|
173 |
},
|
174 |
{
|
175 |
"name": "Film Noir",
|
176 |
-
"prompt": "(((
|
177 |
"negative_prompt": "ugly, deformed, noisy, blurry, low contrast, realism, photorealistic, vibrant, colorful"
|
178 |
},
|
179 |
{
|
180 |
"name": "Neon Noir",
|
181 |
-
"prompt": "(((
|
182 |
"negative_prompt": "bright, sunny, daytime, low contrast, black and white, sketch, watercolor"
|
183 |
}
|
184 |
]
|
|
|
3 |
styles = [
|
4 |
{
|
5 |
"name": "Kinofilm",
|
6 |
+
"prompt": "(((Easter greetings card))), cinematic still {prompt} . emotional, harmonious, vignette, highly detailed, high budget, bokeh, cinemascope, moody, epic, gorgeous, film grain, grainy",
|
7 |
"negative_prompt": "anime, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured"
|
8 |
},
|
9 |
{
|
10 |
"name": "Anime",
|
11 |
+
"prompt": "(((Easter greetings card))), anime artwork {prompt} . anime style, key visual, vibrant, studio anime, highly detailed",
|
12 |
"negative_prompt": "photo, deformed, black and white, realism, disfigured, low contrast"
|
13 |
},
|
14 |
{
|
15 |
"name": "Ton",
|
16 |
+
"prompt": "(((Easter greetings card))), play-doh style {prompt} . sculpture, clay art, centered composition, Claymation",
|
17 |
"negative_prompt": "sloppy, messy, grainy, highly detailed, ultra textured, photo"
|
18 |
},
|
19 |
{
|
20 |
"name": "Linienkunst",
|
21 |
+
"prompt": "(((Easter greetings card))), line art drawing {prompt} . professional, sleek, modern, minimalist, graphic, line art, vector graphics",
|
22 |
"negative_prompt": "anime, photorealistic, 35mm film, deformed, glitch, blurry, noisy, off-center, deformed, cross-eyed, closed eyes, bad anatomy, ugly, disfigured, mutated, realism, realistic, impressionism, expressionism, oil, acrylic"
|
23 |
},
|
24 |
{
|
25 |
"name": "Low Poly",
|
26 |
+
"prompt": "(((Easter greetings card))), low-poly style {prompt} . low-poly game art, polygon mesh, jagged, blocky, wireframe edges, centered composition",
|
27 |
"negative_prompt": "noisy, sloppy, messy, grainy, highly detailed, ultra textured, photo"
|
28 |
},
|
29 |
{
|
30 |
"name": "Origami",
|
31 |
+
"prompt": "(((Easter greetings card))), origami style {prompt} . paper art, pleated paper, folded, origami art, pleats, cut and fold, centered composition",
|
32 |
"negative_prompt": "noisy, sloppy, messy, grainy, highly detailed, ultra textured, photo"
|
33 |
},
|
34 |
{
|
35 |
"name": "Plakat",
|
36 |
+
"prompt": "(((Easter greetings card))), Advertising poster style {prompt} . Professional, modern, product-focused, commercial, eye-catching, highly detailed",
|
37 |
"negative_prompt": "noisy, blurry, amateurish, sloppy, unattractive"
|
38 |
},
|
39 |
{
|
40 |
"name": "Fahrzeug/Auto",
|
41 |
+
"prompt": "(((Easter greetings card))), Automotive advertisement style {prompt} . Sleek, dynamic, professional, commercial, vehicle-focused, high-resolution, highly detailed",
|
42 |
"negative_prompt": "noisy, blurry, unattractive, sloppy, unprofessional"
|
43 |
},
|
44 |
{
|
45 |
"name": "Mode",
|
46 |
+
"prompt": "(((Easter greetings card))), Fashion editorial style {prompt} . High fashion, trendy, stylish, editorial, magazine style, professional, highly detailed",
|
47 |
"negative_prompt": "outdated, blurry, noisy, unattractive, sloppy"
|
48 |
},
|
49 |
{
|
50 |
"name": "Pixelkunst",
|
51 |
+
"prompt": "(((Easter greetings card))), pixel-art {prompt} . low-res, blocky, pixel art style, 8-bit graphics",
|
52 |
"negative_prompt": "sloppy, messy, blurry, noisy, highly detailed, ultra textured, photo, realistic"
|
53 |
},
|
54 |
{
|
55 |
"name": "Abstrakt",
|
56 |
+
"prompt": "(((Easter greetings card))), abstract expressionist painting {prompt} . energetic brushwork, bold colors, abstract forms, expressive, emotional",
|
57 |
"negative_prompt": "realistic, photorealistic, low contrast, plain, simple, monochrome"
|
58 |
},
|
59 |
{
|
60 |
"name": "Graffiti",
|
61 |
+
"prompt": "(((Easter greetings card))), graffiti style {prompt} . street art, vibrant, urban, detailed, tag, mural",
|
62 |
"negative_prompt": "ugly, deformed, noisy, blurry, low contrast, realism, photorealistic"
|
63 |
},
|
64 |
{
|
65 |
"name": "Psychedelisch",
|
66 |
+
"prompt": "(((Easter greetings card))), psychedelic style {prompt} . vibrant colors, swirling patterns, abstract forms, surreal, trippy",
|
67 |
"negative_prompt": "monochrome, black and white, low contrast, realistic, photorealistic, plain, simple"
|
68 |
},
|
69 |
{
|
70 |
"name": "Steampunk",
|
71 |
+
"prompt": "(((Easter greetings card))), steampunk style {prompt} . antique, mechanical, brass and copper tones, gears, intricate, detailed",
|
72 |
"negative_prompt": "deformed, glitch, noisy, low contrast, anime, photorealistic"
|
73 |
},
|
74 |
{
|
75 |
"name": "Aquarell",
|
76 |
+
"prompt": "(((Easter greetings card))), watercolor painting {prompt} . vibrant, beautiful, painterly, detailed, textural, artistic",
|
77 |
"negative_prompt": "anime, photorealistic, 35mm film, deformed, glitch, low contrast, noisy"
|
78 |
},
|
79 |
{
|
80 |
"name": "Cyberpunk-Stadt",
|
81 |
+
"prompt": "(((Easter greetings card))), cyberpunk cityscape {prompt} . neon lights, dark alleys, skyscrapers, futuristic, vibrant colors, high contrast, highly detailed",
|
82 |
"negative_prompt": "natural, rural, deformed, low contrast, black and white, sketch, watercolor"
|
83 |
},
|
84 |
{
|
85 |
"name": "Cyberpunk-Spiel",
|
86 |
+
"prompt": "(((Easter greetings card))), cyberpunk game style {prompt} . neon, dystopian, futuristic, digital, vibrant, detailed, high contrast, reminiscent of cyberpunk genre video games",
|
87 |
"negative_prompt": "historical, natural, rustic, low detailed"
|
88 |
},
|
89 |
{
|
90 |
"name": "Mario",
|
91 |
+
"prompt": "(((Easter greetings card))), Super Mario style {prompt} . vibrant, cute, cartoony, fantasy, playful, reminiscent of Super Mario series",
|
92 |
"negative_prompt": "realistic, modern, horror, dystopian, violent"
|
93 |
},
|
94 |
{
|
95 |
"name": "Minecraft",
|
96 |
+
"prompt": "(((Easter greetings card))), Minecraft style {prompt} . blocky, pixelated, vibrant colors, recognizable characters and objects, game assets",
|
97 |
"negative_prompt": "smooth, realistic, detailed, photorealistic, noise, blurry, deformed"
|
98 |
},
|
99 |
{
|
100 |
"name": "Strategiespiel",
|
101 |
+
"prompt": "(((Easter greetings card))), strategy game style {prompt} . overhead view, detailed map, units, reminiscent of real-time strategy video games",
|
102 |
"negative_prompt": "first-person view, modern, photorealistic"
|
103 |
},
|
104 |
{
|
105 |
"name": "Dystopisch",
|
106 |
+
"prompt": "(((Easter greetings card))), dystopian style {prompt} . bleak, post-apocalyptic, somber, dramatic, highly detailed",
|
107 |
"negative_prompt": "ugly, deformed, noisy, blurry, low contrast, cheerful, optimistic, vibrant, colorful"
|
108 |
},
|
109 |
{
|
110 |
"name": "Märchen",
|
111 |
+
"prompt": "(((Easter greetings card))), fairy tale {prompt} . magical, fantastical, enchanting, storybook style, highly detailed",
|
112 |
"negative_prompt": "realistic, modern, ordinary, mundane"
|
113 |
},
|
114 |
{
|
115 |
"name": "Gotisch",
|
116 |
+
"prompt": "(((Easter greetings card))), gothic style {prompt} . dark, mysterious, haunting, dramatic, ornate, detailed",
|
117 |
"negative_prompt": "ugly, deformed, noisy, blurry, low contrast, realism, photorealistic, cheerful, optimistic"
|
118 |
},
|
119 |
{
|
120 |
"name": "Metropole",
|
121 |
+
"prompt": "(((Easter greetings card))), metropolis-themed {prompt} . urban, cityscape, skyscrapers, modern, futuristic, highly detailed",
|
122 |
"negative_prompt": "rural, natural, rustic, historical, simple"
|
123 |
},
|
124 |
{
|
125 |
"name": "Monochrom",
|
126 |
+
"prompt": "(((Easter greetings card))), monochrome {prompt} . black and white, contrast, tone, texture, detailed",
|
127 |
"negative_prompt": "colorful, vibrant, noisy, blurry, deformed"
|
128 |
},
|
129 |
{
|
130 |
"name": "Weltraum",
|
131 |
+
"prompt": "(((Easter greetings card))), space-themed {prompt} . cosmic, celestial, stars, galaxies, nebulas, planets, science fiction, highly detailed",
|
132 |
"negative_prompt": "earthly, mundane, ground-based, realism"
|
133 |
},
|
134 |
{
|
135 |
"name": "Buntglas",
|
136 |
+
"prompt": "(((Easter greetings card))), stained glass style {prompt} . vibrant, beautiful, translucent, intricate, detailed",
|
137 |
"negative_prompt": "ugly, deformed, noisy, blurry, low contrast, realism, photorealistic"
|
138 |
},
|
139 |
{
|
140 |
"name": "Stammeskunst",
|
141 |
+
"prompt": "(((Easter greetings card))), tribal style {prompt} . indigenous, ethnic, traditional patterns, bold, natural colors, highly detailed",
|
142 |
"negative_prompt": "modern, futuristic, minimalist, pastel"
|
143 |
},
|
144 |
{
|
145 |
"name": "Zentangle",
|
146 |
+
"prompt": "(((Easter greetings card))), zentangle {prompt} . intricate, abstract, monochrome, patterns, meditative, highly detailed",
|
147 |
"negative_prompt": "colorful, representative, simplistic, large fields of color"
|
148 |
},
|
149 |
{
|
150 |
"name": "Kirigami",
|
151 |
+
"prompt": "(((Easter greetings card))), kirigami representation of {prompt} . 3D, paper folding, paper cutting, Japanese, intricate, symmetrical, precision, clean lines",
|
152 |
"negative_prompt": "painting, drawing, 2D, noisy, blurry, deformed"
|
153 |
},
|
154 |
{
|
155 |
"name": "Papiermaché",
|
156 |
+
"prompt": "(((Easter greetings card))), paper mache representation of {prompt} . 3D, sculptural, textured, handmade, vibrant, fun",
|
157 |
"negative_prompt": "2D, flat, photo, sketch, digital art, deformed, noisy, blurry"
|
158 |
},
|
159 |
{
|
160 |
"name": "Papierkräuseln",
|
161 |
+
"prompt": "(((Easter greetings card))), paper quilling art of {prompt} . intricate, delicate, curling, rolling, shaping, coiling, loops, 3D, dimensional, ornamental",
|
162 |
"negative_prompt": "photo, painting, drawing, 2D, flat, deformed, noisy, blurry"
|
163 |
},
|
164 |
{
|
165 |
"name": "Scherenschnitt-Schattenbox",
|
166 |
+
"prompt": "(((Easter greetings card))), 3D papercut shadow box of {prompt} . layered, dimensional, depth, silhouette, shadow, papercut, handmade, high contrast",
|
167 |
"negative_prompt": "painting, drawing, photo, 2D, flat, high detail, blurry, noisy, disfigured"
|
168 |
},
|
169 |
{
|
170 |
"name": "Gestapelte Scherenschnitte",
|
171 |
+
"prompt": "(((Easter greetings card))), stacked papercut art of {prompt} . 3D, layered, dimensional, depth, precision cut, stacked layers, papercut, high contrast",
|
172 |
"negative_prompt": "2D, flat, noisy, blurry, painting, drawing, photo, deformed"
|
173 |
},
|
174 |
{
|
175 |
"name": "Film Noir",
|
176 |
+
"prompt": "(((Easter greetings card))), film noir style {prompt} . monochrome, high contrast, dramatic shadows, 1940s style, mysterious, cinematic",
|
177 |
"negative_prompt": "ugly, deformed, noisy, blurry, low contrast, realism, photorealistic, vibrant, colorful"
|
178 |
},
|
179 |
{
|
180 |
"name": "Neon Noir",
|
181 |
+
"prompt": "(((Easter greetings card))), neon noir {prompt} . cyberpunk, dark, rainy streets, neon signs, high contrast, low light, vibrant, highly detailed",
|
182 |
"negative_prompt": "bright, sunny, daytime, low contrast, black and white, sketch, watercolor"
|
183 |
}
|
184 |
]
|
webui.py
CHANGED
@@ -9,13 +9,13 @@ from modules.sdxl_styles import style_keys, aspect_ratios
|
|
9 |
|
10 |
QM_LOGO = Image.open("resources/qm_logo.png")
|
11 |
QM_COLOR = Color(name="qm", c50="#effaed",c100="#def5db",c200="#64b445",c300="#c6eec0",c400="#b9ebb3",c500="#64b445",c600="#55993b",c700="#467e30",c800="#325a23",c900="#233f18",c950="#192d11")
|
12 |
-
PROMPT_EXAMPLES = ["
|
13 |
-
"
|
14 |
-
"
|
15 |
EXAMPLE_GREETINGS = [
|
16 |
-
"Ich wünsche dir von Herzen ein frohes
|
17 |
-
"
|
18 |
-
"Zauberhafte
|
19 |
]
|
20 |
INIT_IMAGE_PATH = "resources/init.png"
|
21 |
|
@@ -101,20 +101,20 @@ shared.gradio_root = gr.Blocks(title='QualityMinds AI Christmas Card Maker', css
|
|
101 |
with shared.gradio_root:
|
102 |
gr.Markdown(
|
103 |
"""
|
104 |
-
# QualityMinds KI
|
105 |
""")
|
106 |
with gr.Accordion("Info", elem_classes='panel-container', open=False):
|
107 |
with gr.Column():
|
108 |
gr.Markdown("""
|
109 |
-
* Beschreibe das Motiv der
|
110 |
* Zur Übersetzung einer Beschreibung ins Englische eignet sich beispielsweise [deepl.com](https://www.deepl.com/translator#de/Schneekugeln) helfen.
|
111 |
-
* Kurze persönliche
|
112 |
Längere Texte können nach Druck handschriftlich zur Rückseite hinzugefügt werden.
|
113 |
-
* Chat-KIs wie [Bing Chat](https://www.bing.com/search?q=Bing+AI&showconv=1) können bei der Erstellung persönlicher
|
114 |
-
* Erstelle fünf unterschiedliche persönliche
|
115 |
-
* Erstelle drei unterschiedliche persönliche
|
116 |
-
* Erstelle fünf unterschiedliche persönliche
|
117 |
-
* Dieses Werkzeug basiert auf [Stable Diffusion XL](https://stability.ai/stable-diffusion) v1.0 und der Oberfläche [Fooocus](https://github.com/lllyasviel/Fooocus), der Code ist OpenSource auf [HuggingFace](https://huggingface.co/spaces/QualityMinds/
|
118 |
""")
|
119 |
|
120 |
with gr.Row(elem_classes='panel-container'):
|
@@ -122,18 +122,18 @@ with shared.gradio_root:
|
|
122 |
with gr.Row():
|
123 |
with gr.Column(scale=5):
|
124 |
gr.Markdown("##### Prompt (Englisch)", elem_classes="input-label")
|
125 |
-
prompt = gr.Textbox(value="", placeholder="Was möchtest Du auf der
|
126 |
autofocus=True, container=False, show_label=False, lines=2)
|
127 |
with gr.Column(scale=1, min_width="80px"):
|
128 |
gr.Markdown("##### Stil", elem_classes="input-label")
|
129 |
style_selection = gr.Dropdown(choices=style_keys, value='Kinofilm', container=False, show_label=False, elem_id="style-selection")
|
130 |
with gr.Column(scale=1, min_width="80px"):
|
131 |
progress_html = gr.HTML(visible=True, elem_id='progress-bar', elem_classes='progress-bar')
|
132 |
-
run_button = gr.Button(value="
|
133 |
with gr.Row():
|
134 |
gr.Examples(elem_id="prompt-examples", examples=PROMPT_EXAMPLES, inputs=[prompt])
|
135 |
|
136 |
-
toggle_greet = gr.Checkbox(label="Persönliche
|
137 |
container=False, value=True, interactive=True)
|
138 |
|
139 |
greeting_row=gr.Row(elem_classes='panel-container')
|
@@ -142,9 +142,9 @@ with shared.gradio_root:
|
|
142 |
greet = gr.Textbox(value=EXAMPLE_GREETINGS[0], placeholder="", interactive=True, container=False, lines=2, max_lines=2, show_label=False)
|
143 |
greet_active = gr.Textbox(value=EXAMPLE_GREETINGS[0], visible=False, container=False, show_label=False)
|
144 |
greet_examples = gr.Examples(elem_id="greet-examples", examples=EXAMPLE_GREETINGS, inputs=[greet])
|
145 |
-
generated_image = gr.Image(visible=False, type='pil', label="Erstelle
|
146 |
value=INIT_IMAGE_PATH, interactive=False, show_share_button=False, show_download_button=False)
|
147 |
-
generated_image_overlayed = gr.Image(label="
|
148 |
value=overlay_image(INIT_IMAGE_PATH, toggle_greet.value, greet.value), show_share_button=False)
|
149 |
generated_image_path = gr.Text(visible=False, value=INIT_IMAGE_PATH, container=False, show_label=False)
|
150 |
toggle_greet.change(fn=toggle_greet_visibility, inputs=[toggle_greet], outputs=[greeting_row], queue=False, show_progress=False)\
|
|
|
9 |
|
10 |
QM_LOGO = Image.open("resources/qm_logo.png")
|
11 |
QM_COLOR = Color(name="qm", c50="#effaed",c100="#def5db",c200="#64b445",c300="#c6eec0",c400="#b9ebb3",c500="#64b445",c600="#55993b",c700="#467e30",c800="#325a23",c900="#233f18",c950="#192d11")
|
12 |
+
PROMPT_EXAMPLES = ["A field of flowers blooming in the shape of Easter eggs",
|
13 |
+
"A bunny delivering Easter eggs in a hot air balloon",
|
14 |
+
"A magical Easter castle with towers made of chocolate and candy"]
|
15 |
EXAMPLE_GREETINGS = [
|
16 |
+
"Ich wünsche dir von Herzen ein frohes Osterfest.",
|
17 |
+
"Frohe Ostern! Möge dein Tag mit strahlendem Sonnenschein und viel Freude gefüllt sein.",
|
18 |
+
"Zauberhafte Ostern für dich!"
|
19 |
]
|
20 |
INIT_IMAGE_PATH = "resources/init.png"
|
21 |
|
|
|
101 |
with shared.gradio_root:
|
102 |
gr.Markdown(
|
103 |
"""
|
104 |
+
# QualityMinds KI Osterkarten-Generator
|
105 |
""")
|
106 |
with gr.Accordion("Info", elem_classes='panel-container', open=False):
|
107 |
with gr.Column():
|
108 |
gr.Markdown("""
|
109 |
+
* Beschreibe das Motiv der Osterkarte in einem Prompt (Englisch), wähle ggf. Stil und los!
|
110 |
* Zur Übersetzung einer Beschreibung ins Englische eignet sich beispielsweise [deepl.com](https://www.deepl.com/translator#de/Schneekugeln) helfen.
|
111 |
+
* Kurze persönliche Ostergrüße (bis 2 Zeilen) lassen sich auf der Vorderseite hinzufügen.
|
112 |
Längere Texte können nach Druck handschriftlich zur Rückseite hinzugefügt werden.
|
113 |
+
* Chat-KIs wie [Bing Chat](https://www.bing.com/search?q=Bing+AI&showconv=1) können bei der Erstellung persönlicher Ostergrüße helfen, z.B. mit Prompts wie
|
114 |
+
* Erstelle fünf unterschiedliche persönliche Ostergrüße für meinen Vater Anakin (je ca. 120 Zeichen). Erwähne dabei unseren gemeinsamen Urlaub auf Tatooine.
|
115 |
+
* Erstelle drei unterschiedliche persönliche Ostergrüße für meinen geschätzten Arbeitskollegen Michael (je ca. 150 Zeichen). Gehe dabei Schritt für Schritt vor.
|
116 |
+
* Erstelle fünf unterschiedliche persönliche Ostergrüße für eine Osterkarte, auf der eine Schneekugel abgebildet ist (je ca. 133 Zeichen) und erkläre diese.
|
117 |
+
* Dieses Werkzeug basiert auf [Stable Diffusion XL](https://stability.ai/stable-diffusion) v1.0 und der Oberfläche [Fooocus](https://github.com/lllyasviel/Fooocus), der Code ist OpenSource auf [HuggingFace](https://huggingface.co/spaces/QualityMinds/Osterkarten/tree/main) verfügbar.
|
118 |
""")
|
119 |
|
120 |
with gr.Row(elem_classes='panel-container'):
|
|
|
122 |
with gr.Row():
|
123 |
with gr.Column(scale=5):
|
124 |
gr.Markdown("##### Prompt (Englisch)", elem_classes="input-label")
|
125 |
+
prompt = gr.Textbox(value="", placeholder="Was möchtest Du auf der Osterkarte abbilden?",
|
126 |
autofocus=True, container=False, show_label=False, lines=2)
|
127 |
with gr.Column(scale=1, min_width="80px"):
|
128 |
gr.Markdown("##### Stil", elem_classes="input-label")
|
129 |
style_selection = gr.Dropdown(choices=style_keys, value='Kinofilm', container=False, show_label=False, elem_id="style-selection")
|
130 |
with gr.Column(scale=1, min_width="80px"):
|
131 |
progress_html = gr.HTML(visible=True, elem_id='progress-bar', elem_classes='progress-bar')
|
132 |
+
run_button = gr.Button(value="Osterkarte\nerstellen", variant='primary', elem_id='generate-button', )
|
133 |
with gr.Row():
|
134 |
gr.Examples(elem_id="prompt-examples", examples=PROMPT_EXAMPLES, inputs=[prompt])
|
135 |
|
136 |
+
toggle_greet = gr.Checkbox(label="Persönliche Ostergrüße hinzufügen", elem_id="toggle-greet-checkbox",
|
137 |
container=False, value=True, interactive=True)
|
138 |
|
139 |
greeting_row=gr.Row(elem_classes='panel-container')
|
|
|
142 |
greet = gr.Textbox(value=EXAMPLE_GREETINGS[0], placeholder="", interactive=True, container=False, lines=2, max_lines=2, show_label=False)
|
143 |
greet_active = gr.Textbox(value=EXAMPLE_GREETINGS[0], visible=False, container=False, show_label=False)
|
144 |
greet_examples = gr.Examples(elem_id="greet-examples", examples=EXAMPLE_GREETINGS, inputs=[greet])
|
145 |
+
generated_image = gr.Image(visible=False, type='pil', label="Erstelle Osterkarte...", elem_classes="generated-image", width=1280,
|
146 |
value=INIT_IMAGE_PATH, interactive=False, show_share_button=False, show_download_button=False)
|
147 |
+
generated_image_overlayed = gr.Image(label="Osterkarte", type='pil', elem_classes="generated-image", width=1280,
|
148 |
value=overlay_image(INIT_IMAGE_PATH, toggle_greet.value, greet.value), show_share_button=False)
|
149 |
generated_image_path = gr.Text(visible=False, value=INIT_IMAGE_PATH, container=False, show_label=False)
|
150 |
toggle_greet.change(fn=toggle_greet_visibility, inputs=[toggle_greet], outputs=[greeting_row], queue=False, show_progress=False)\
|