Yaron Koresh commited on
Commit
ff24105
·
verified ·
1 Parent(s): ec62674

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -15
app.py CHANGED
@@ -83,12 +83,12 @@ def generate_random_string(length):
83
  characters = string.ascii_letters + string.digits
84
  return ''.join(random.choice(characters) for _ in range(length))
85
 
86
- @spaces.GPU(duration=35)
87
  def Piper(_do,_dont):
88
  return pipe(
89
  _do,
90
  height=320,
91
- width=576,
92
  negative_prompt=_dont,
93
  num_inference_steps=50,
94
  guidance_scale=2
@@ -130,7 +130,7 @@ footer {
130
  max-width: 15cm !important;
131
  }
132
  .image-container {
133
- aspect-ratio: 576 / 320 !important;
134
  }
135
  .dropdown-arrow {
136
  display: none !important;
@@ -177,18 +177,6 @@ with gr.Blocks(theme=gr.themes.Soft(),css=css,js=js) as demo:
177
  result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
178
  result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
179
  result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
180
- with gr.Row():
181
- result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
182
- result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
183
- result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
184
- with gr.Row():
185
- result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
186
- result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
187
- result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
188
- with gr.Row():
189
- result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
190
- result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
191
- result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
192
 
193
  def _ret(idx,p1,p2):
194
  print(f'Starting {idx}: {p1} {p2}')
 
83
  characters = string.ascii_letters + string.digits
84
  return ''.join(random.choice(characters) for _ in range(length))
85
 
86
+ @spaces.GPU(duration=25)
87
  def Piper(_do,_dont):
88
  return pipe(
89
  _do,
90
  height=320,
91
+ width=480,
92
  negative_prompt=_dont,
93
  num_inference_steps=50,
94
  guidance_scale=2
 
130
  max-width: 15cm !important;
131
  }
132
  .image-container {
133
+ aspect-ratio: 480 / 320 !important;
134
  }
135
  .dropdown-arrow {
136
  display: none !important;
 
177
  result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
178
  result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
179
  result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
 
 
 
 
 
 
 
 
 
 
 
 
180
 
181
  def _ret(idx,p1,p2):
182
  print(f'Starting {idx}: {p1} {p2}')