Yaron Koresh commited on
Commit
0343cff
·
verified ·
1 Parent(s): e69805c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -86,14 +86,14 @@ def generate_random_string(length):
86
  characters = string.ascii_letters + string.digits
87
  return ''.join(random.choice(characters) for _ in range(length))
88
 
89
- @spaces.GPU(duration=50)
90
  def Piper(_do,_dont):
91
  return pipe(
92
  _do,
93
  height=512,
94
  width=576,
95
  negative_prompt=_dont,
96
- num_inference_steps=250,
97
  guidance_scale=4
98
  )
99
 
@@ -102,9 +102,9 @@ def infer(prompt,prompt2):
102
  prompt_en = translate(prompt,"english")
103
  prompt2_en = translate(prompt2,"english")
104
  if prompt == None or prompt.strip() == "":
105
- _do = 'sharp warm dark muted vintage foreground colors, rough texture, dynamic poze, proportional, reasonable, realistic, natural, sharp cold light vivid playful background colors'
106
  else:
107
- _do = f'photographed { prompt_en }, sharp warm dark muted vintage foreground colors, rough texture, dynamic poze, proportional, reasonable, realistic, natural, sharp cold light vivid playful background colors'
108
  if prompt2 == None or prompt2.strip() == "":
109
  _dont = 'distorted items, disfigured fingers, unreal hands, unreasonable scene, ugly presentation, deformed palms, bad anatomy, poor details, visible logos, visible texts, visible labels'
110
  else:
 
86
  characters = string.ascii_letters + string.digits
87
  return ''.join(random.choice(characters) for _ in range(length))
88
 
89
+ @spaces.GPU(duration=45)
90
  def Piper(_do,_dont):
91
  return pipe(
92
  _do,
93
  height=512,
94
  width=576,
95
  negative_prompt=_dont,
96
+ num_inference_steps=200,
97
  guidance_scale=4
98
  )
99
 
 
102
  prompt_en = translate(prompt,"english")
103
  prompt2_en = translate(prompt2,"english")
104
  if prompt == None or prompt.strip() == "":
105
+ _do = 'muted vintage foreground colors, rough texture, dynamic poze, proportional, reasonable, realistic, natural, light playful background colors'
106
  else:
107
+ _do = f'photographed { prompt_en }, muted vintage foreground colors, rough texture, dynamic poze, proportional, reasonable, realistic, natural, light playful background colors'
108
  if prompt2 == None or prompt2.strip() == "":
109
  _dont = 'distorted items, disfigured fingers, unreal hands, unreasonable scene, ugly presentation, deformed palms, bad anatomy, poor details, visible logos, visible texts, visible labels'
110
  else: