Yaron Koresh commited on
Commit
8c155ca
·
verified ·
1 Parent(s): 23a2661

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -75,10 +75,10 @@ def generate_random_string(length):
75
  def Piper(_do,_dont):
76
  return pipe(
77
  _do,
78
- height=384,
79
  width=512,
80
  negative_prompt=_dont,
81
- num_inference_steps=400,
82
  guidance_scale=10
83
  )
84
 
@@ -87,13 +87,13 @@ def infer(prompt,prompt2):
87
  prompt_en = translate(prompt,"english")
88
  prompt2_en = translate(prompt2,"english")
89
  if prompt == None or prompt.strip() == "":
90
- _do = 'deep natural colors, rough texture, proportional structure, dynamic poze, realistic details, award winning photograph, soft natural lighting, deep field, high definition, highly detailed, soft pastel background'
91
  else:
92
- _do = f'{ prompt_en }, deep natural colors, rough texture, proportional structure, dynamic poze, realistic details, award winning photograph, soft natural lighting, deep field, high definition, highly detailed, soft pastel background'
93
  if prompt2 == None or prompt2.strip() == "":
94
  _dont = 'ugly, deformed, inflated, disfigured, poor details, bad anatomy, logos, texts, labels'
95
  else:
96
- _dont = f'ugly, deformed, inflated, disfigured, poor details, bad anatomy, logos, texts, labels, {prompt2_en} where in {prompt_en}, {prompt2_en}'
97
  image = Piper(_do,_dont).images[0].save(name)
98
  return name
99
 
@@ -106,7 +106,7 @@ footer {
106
  max-width: 15cm;
107
  }
108
  #image-container {
109
- aspect-ratio: 4 / 3;
110
  }
111
  .dropdown-arrow {
112
  display: none !important;
 
75
  def Piper(_do,_dont):
76
  return pipe(
77
  _do,
78
+ height=512,
79
  width=512,
80
  negative_prompt=_dont,
81
+ num_inference_steps=500,
82
  guidance_scale=10
83
  )
84
 
 
87
  prompt_en = translate(prompt,"english")
88
  prompt2_en = translate(prompt2,"english")
89
  if prompt == None or prompt.strip() == "":
90
+ _do = 'vivid colors, rough texture, proportional structure, dynamic poze, realistic details, award winning photograph, soft natural lighting, deep field, high definition, highly detailed, beautiful calming background'
91
  else:
92
+ _do = f'{ prompt_en }, vivid colors, rough texture, proportional structure, dynamic poze, realistic details, award winning photograph, soft natural lighting, deep field, high definition, highly detailed, beautiful calming background'
93
  if prompt2 == None or prompt2.strip() == "":
94
  _dont = 'ugly, deformed, inflated, disfigured, poor details, bad anatomy, logos, texts, labels'
95
  else:
96
+ _dont = f'ugly, deformed, inflated, disfigured, poor details, bad anatomy, {prompt2_en} where at {prompt_en}, {prompt2_en}, logos where at {prompt_en}, texts where at {prompt_en}, labels where at {prompt_en}'
97
  image = Piper(_do,_dont).images[0].save(name)
98
  return name
99
 
 
106
  max-width: 15cm;
107
  }
108
  #image-container {
109
+ aspect-ratio: 1 / 1;
110
  }
111
  .dropdown-arrow {
112
  display: none !important;