Yaron Koresh commited on
Commit
7f19912
·
verified ·
1 Parent(s): 266e17b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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=100
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, (0,0,0), font=font)
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 quality, sketch quality, cartoon quality, drawing quality, anime quality, cropping, out of frame, worst quality, low quality, rendering artifacts, duplicated elements, weird body look, mutation, blurry photo, bad body anatomy, unproportional body parts, cloned face, disfigured body, malformed photo, missing body parts, extra body parts, fused body parts{inp[2]}"
226
 
227
  if inp[1] != "":
228
  inp[1] = ", " + inp[1]
229
 
230
- inp[1] = f'taken from real situations, bright 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
 
 
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