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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -86,15 +86,15 @@ 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=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
 
100
  def infer(prompt,prompt2):
@@ -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 = '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:
 
86
  characters = string.ascii_letters + string.digits
87
  return ''.join(random.choice(characters) for _ in range(length))
88
 
89
+ @spaces.GPU(duration=35)
90
  def Piper(_do,_dont):
91
  return pipe(
92
  _do,
93
  height=512,
94
  width=576,
95
  negative_prompt=_dont,
96
+ num_inference_steps=100,
97
+ guidance_scale=10
98
  )
99
 
100
  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 = 'realistic natural sharp light vivid vintage scheme, rough texture, dynamic poze, reasonable proportions'
106
  else:
107
+ _do = f'real photographed { prompt_en } scene, realistic natural sharp light vivid vintage scheme, rough texture, dynamic poze, reasonable proportions'
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: