Yaron Koresh commited on
Commit
c2c0ad5
·
verified ·
1 Parent(s): f046f71

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
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=120)
75
  def Piper(_do,_dont):
76
  return pipe(
77
  _do,
78
- height=512,
79
- width=768,
80
  negative_prompt=_dont,
81
  num_inference_steps=400,
82
- guidance_scale=9.5
83
  )
84
 
85
  def infer(prompt,prompt2):
@@ -103,7 +103,7 @@ css="""
103
  max-width: 15cm;
104
  }
105
  #image-container {
106
- aspect-ratio: 3 / 2;
107
  }
108
  .dropdown-arrow {
109
  display: none !important;
@@ -112,8 +112,8 @@ css="""
112
 
113
  js="""
114
  function custom(){
115
- document.querySelector("div#prompt input").setAttribute("maxlength","38");
116
- document.querySelector("div#prompt2 input").setAttribute("maxlength","38");
117
  }
118
  """
119
 
 
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=528,
79
+ width=704,
80
  negative_prompt=_dont,
81
  num_inference_steps=400,
82
+ guidance_scale=9
83
  )
84
 
85
  def infer(prompt,prompt2):
 
103
  max-width: 15cm;
104
  }
105
  #image-container {
106
+ aspect-ratio: 4 / 3;
107
  }
108
  .dropdown-arrow {
109
  display: none !important;
 
112
 
113
  js="""
114
  function custom(){
115
+ document.querySelector("div#prompt input").setAttribute("maxlength","35");
116
+ document.querySelector("div#prompt2 input").setAttribute("maxlength","15");
117
  }
118
  """
119