Yaron Koresh commited on
Commit
2e0d291
·
verified ·
1 Parent(s): 8c155ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -71,15 +71,15 @@ 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=100)
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
 
85
  def infer(prompt,prompt2):
@@ -93,7 +93,7 @@ def infer(prompt,prompt2):
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,7 +106,7 @@ footer {
106
  max-width: 15cm;
107
  }
108
  #image-container {
109
- aspect-ratio: 1 / 1;
110
  }
111
  .dropdown-arrow {
112
  display: none !important;
 
71
  characters = string.ascii_letters + string.digits
72
  return ''.join(random.choice(characters) for _ in range(length))
73
 
74
+ @spaces.GPU(duration=25)
75
  def Piper(_do,_dont):
76
  return pipe(
77
  _do,
78
  height=512,
79
+ width=768,
80
  negative_prompt=_dont,
81
+ num_inference_steps=40,
82
+ guidance_scale=9
83
  )
84
 
85
  def infer(prompt,prompt2):
 
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 in {prompt_en}, {prompt2_en}, logos where in {prompt_en}, texts where in {prompt_en}, labels where in {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: 3 / 2;
110
  }
111
  .dropdown-arrow {
112
  display: none !important;