Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -187,12 +187,12 @@ def pipe_generate(img,p1,p2,time,title):
|
|
| 187 |
|
| 188 |
if title != "":
|
| 189 |
draw = ImageDraw.Draw(img)
|
| 190 |
-
textheight=
|
| 191 |
font = ImageFont.truetype(r"OpenSans-Bold.ttf", textheight)
|
| 192 |
textwidth = draw.textlength(title,font)
|
| 193 |
x = (width - textwidth) // 2
|
| 194 |
y = (height - textheight) // 2
|
| 195 |
-
draw.text((x, y), title, (
|
| 196 |
|
| 197 |
additional_image = img if additional_image else None
|
| 198 |
|
|
@@ -222,12 +222,12 @@ def handle_generate(*_inp):
|
|
| 222 |
if inp[2] != "":
|
| 223 |
inp[2] = ", " + inp[2]
|
| 224 |
|
| 225 |
-
inp[2] = f"textual content, pixelated photo, unrealistic situation, cgi
|
| 226 |
|
| 227 |
if inp[1] != "":
|
| 228 |
inp[1] = ", " + inp[1]
|
| 229 |
|
| 230 |
-
inp[1] = f'
|
| 231 |
|
| 232 |
print(f"""
|
| 233 |
|
|
|
|
| 187 |
|
| 188 |
if title != "":
|
| 189 |
draw = ImageDraw.Draw(img)
|
| 190 |
+
textheight=200
|
| 191 |
font = ImageFont.truetype(r"OpenSans-Bold.ttf", textheight)
|
| 192 |
textwidth = draw.textlength(title,font)
|
| 193 |
x = (width - textwidth) // 2
|
| 194 |
y = (height - textheight) // 2
|
| 195 |
+
draw.text((x, y), title, (255,255,255), font=font)
|
| 196 |
|
| 197 |
additional_image = img if additional_image else None
|
| 198 |
|
|
|
|
| 222 |
if inp[2] != "":
|
| 223 |
inp[2] = ", " + inp[2]
|
| 224 |
|
| 225 |
+
inp[2] = f"textual content, pixelated photo, unrealistic situation, cgi, anime or cartoon quality, drawing quality, cropped photo, photo out of frame, worst quality, low quality, rendering artifacts, duplicated elements, weird style, non-standard humans body, non-standard objects structure, blurry photo, wrong body anatomy, unproportional, cloned face{inp[2]}"
|
| 226 |
|
| 227 |
if inp[1] != "":
|
| 228 |
inp[1] = ", " + inp[1]
|
| 229 |
|
| 230 |
+
inp[1] = f'realistic situations, dark vivid colors, realistic, beautiful pretty look, genuine and authentic reality, logical reasonable photo content, natural look, masterpiece photo, highly detailed photo{inp[1]}'
|
| 231 |
|
| 232 |
print(f"""
|
| 233 |
|