Spaces:
Running
Running
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -77,15 +77,15 @@ 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 |
return pipe(
|
83 |
_do,
|
84 |
-
height=
|
85 |
width=768,
|
86 |
-
num_inference_steps=
|
87 |
max_sequence_length=512,
|
88 |
-
guidance_scale=
|
89 |
)
|
90 |
|
91 |
def infer(prompt_en):
|
@@ -118,7 +118,7 @@ footer {
|
|
118 |
max-width: 15cm !important;
|
119 |
}
|
120 |
.image-container {
|
121 |
-
aspect-ratio: 768 /
|
122 |
}
|
123 |
.dropdown-arrow {
|
124 |
display: none !important;
|
@@ -153,6 +153,7 @@ with gr.Blocks(theme=gr.themes.Soft(),css=css,js=js) as demo:
|
|
153 |
with gr.Row():
|
154 |
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
155 |
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
|
|
156 |
|
157 |
def _ret(idx,p1):
|
158 |
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=50)
|
81 |
def Piper(_do):
|
82 |
return pipe(
|
83 |
_do,
|
84 |
+
height=512,
|
85 |
width=768,
|
86 |
+
num_inference_steps=100,
|
87 |
max_sequence_length=512,
|
88 |
+
guidance_scale=2
|
89 |
)
|
90 |
|
91 |
def infer(prompt_en):
|
|
|
118 |
max-width: 15cm !important;
|
119 |
}
|
120 |
.image-container {
|
121 |
+
aspect-ratio: 768 / 512 !important;
|
122 |
}
|
123 |
.dropdown-arrow {
|
124 |
display: none !important;
|
|
|
153 |
with gr.Row():
|
154 |
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
155 |
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
156 |
+
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
157 |
|
158 |
def _ret(idx,p1):
|
159 |
print(f'Starting {idx}: {p1}')
|