Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -83,15 +83,15 @@ 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=
|
87 |
def Piper(_do,_dont):
|
88 |
return pipe(
|
89 |
_do,
|
90 |
height=640,
|
91 |
-
width=
|
92 |
negative_prompt=_dont,
|
93 |
-
num_inference_steps=
|
94 |
-
guidance_scale=
|
95 |
)
|
96 |
|
97 |
def infer(prompt_en,prompt2_en):
|
@@ -128,7 +128,7 @@ footer {
|
|
128 |
max-width: 15cm !important;
|
129 |
}
|
130 |
.image-container {
|
131 |
-
aspect-ratio:
|
132 |
}
|
133 |
.dropdown-arrow {
|
134 |
display: none !important;
|
@@ -178,6 +178,15 @@ with gr.Blocks(theme=gr.themes.Soft(),css=css,js=js) as demo:
|
|
178 |
with gr.Row():
|
179 |
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
180 |
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
|
182 |
def _ret(idx,p1,p2):
|
183 |
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=32)
|
87 |
def Piper(_do,_dont):
|
88 |
return pipe(
|
89 |
_do,
|
90 |
height=640,
|
91 |
+
width=768,
|
92 |
negative_prompt=_dont,
|
93 |
+
num_inference_steps=50,
|
94 |
+
guidance_scale=2
|
95 |
)
|
96 |
|
97 |
def infer(prompt_en,prompt2_en):
|
|
|
128 |
max-width: 15cm !important;
|
129 |
}
|
130 |
.image-container {
|
131 |
+
aspect-ratio: 768 / 640 !important;
|
132 |
}
|
133 |
.dropdown-arrow {
|
134 |
display: none !important;
|
|
|
178 |
with gr.Row():
|
179 |
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
180 |
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
181 |
+
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
182 |
+
with gr.Row():
|
183 |
+
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
184 |
+
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
185 |
+
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
186 |
+
with gr.Row():
|
187 |
+
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
188 |
+
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
189 |
+
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
190 |
|
191 |
def _ret(idx,p1,p2):
|
192 |
print(f'Starting {idx}: {p1} {p2}')
|