Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -77,13 +77,13 @@ def generate_random_string(length):
|
|
77 |
characters = string.ascii_letters + string.digits
|
78 |
return ''.join(random.choice(characters) for _ in range(length))
|
79 |
|
80 |
-
@spaces.GPU(duration=
|
81 |
def Piper(_do):
|
82 |
try:
|
83 |
retu = pipe(
|
84 |
_do,
|
85 |
-
height=
|
86 |
-
width=
|
87 |
num_inference_steps=4,
|
88 |
max_sequence_length=256,
|
89 |
guidance_scale=2
|
@@ -126,7 +126,8 @@ footer {
|
|
126 |
max-width: 15cm !important;
|
127 |
}
|
128 |
.image-container {
|
129 |
-
aspect-ratio:
|
|
|
130 |
}
|
131 |
.dropdown-arrow {
|
132 |
display: none !important;
|
@@ -161,6 +162,9 @@ with gr.Blocks(theme=gr.themes.Soft(),css=css,js=js) as demo:
|
|
161 |
with gr.Row():
|
162 |
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
163 |
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
|
|
|
|
|
|
164 |
|
165 |
def _ret(idx,p1):
|
166 |
print(f'Starting {idx}: {p1}')
|
|
|
77 |
characters = string.ascii_letters + string.digits
|
78 |
return ''.join(random.choice(characters) for _ in range(length))
|
79 |
|
80 |
+
@spaces.GPU(duration=30)
|
81 |
def Piper(_do):
|
82 |
try:
|
83 |
retu = pipe(
|
84 |
_do,
|
85 |
+
height=448,
|
86 |
+
width=640,
|
87 |
num_inference_steps=4,
|
88 |
max_sequence_length=256,
|
89 |
guidance_scale=2
|
|
|
126 |
max-width: 15cm !important;
|
127 |
}
|
128 |
.image-container {
|
129 |
+
aspect-ratio: 640 / 448 !important;
|
130 |
+
width: 40vw !important;
|
131 |
}
|
132 |
.dropdown-arrow {
|
133 |
display: none !important;
|
|
|
162 |
with gr.Row():
|
163 |
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
164 |
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
165 |
+
with gr.Row():
|
166 |
+
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
167 |
+
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
168 |
|
169 |
def _ret(idx,p1):
|
170 |
print(f'Starting {idx}: {p1}')
|