Yaron Koresh commited on
Commit
cd47b7b
·
verified ·
1 Parent(s): 04610b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -71,7 +71,7 @@ def generate_random_string(length):
71
  characters = string.ascii_letters + string.digits
72
  return ''.join(random.choice(characters) for _ in range(length))
73
 
74
- @spaces.GPU(duration=30)
75
  def Piper(_do,_dont):
76
  return pipe(
77
  _do,
@@ -79,7 +79,7 @@ def Piper(_do,_dont):
79
  width=1280,
80
  negative_prompt=_dont,
81
  num_inference_steps=50,
82
- guidance_scale=9
83
  )
84
 
85
  def infer(prompt,prompt2):
@@ -87,9 +87,9 @@ 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 = 'vivid colors, live texture, dynamic poze, realistic, accurate, matched, realistic details, award winning photograph, soft natural lighting, deep field, high definition, highly detailed, 8k'
91
  else:
92
- _do = f'{ prompt_en }, vivid colors, live texture, dynamic poze, realistic, accurate, matched, realistic details, award winning photograph, soft natural lighting, deep field, high definition, highly detailed, 8k'
93
  if prompt2 == None or prompt2.strip() == "":
94
  _dont = 'ugly, deformed, wierd, disfigured, poor details, bad anatomy, label, text, logo'
95
  else:
 
71
  characters = string.ascii_letters + string.digits
72
  return ''.join(random.choice(characters) for _ in range(length))
73
 
74
+ @spaces.GPU(duration=40)
75
  def Piper(_do,_dont):
76
  return pipe(
77
  _do,
 
79
  width=1280,
80
  negative_prompt=_dont,
81
  num_inference_steps=50,
82
+ guidance_scale=10
83
  )
84
 
85
  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 = 'vivid hot colors, rough texture, dynamic poze, accurate, matched, realistic details, award winning photograph, soft natural lighting, deep field, high definition, highly detailed, 8k'
91
  else:
92
+ _do = f'{ prompt_en }, vivid hot colors, rough texture, dynamic poze, accurate, matched, realistic details, award winning photograph, soft natural lighting, deep field, high definition, highly detailed, 8k'
93
  if prompt2 == None or prompt2.strip() == "":
94
  _dont = 'ugly, deformed, wierd, disfigured, poor details, bad anatomy, label, text, logo'
95
  else: