Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -107,7 +107,7 @@ def infer(prompt,prompt2):
|
|
107 |
if prompt2 == None or prompt2.strip() == "":
|
108 |
_dont = 'ugly, deformed, disfigured, poor details, bad anatomy, logos, texts, labels'
|
109 |
else:
|
110 |
-
_dont = f'
|
111 |
image = Piper(_do,_dont).images[0].save(name)
|
112 |
return name
|
113 |
|
@@ -141,8 +141,8 @@ footer {
|
|
141 |
|
142 |
js="""
|
143 |
function custom(){
|
144 |
-
document.querySelector("div#prompt input").setAttribute("maxlength","
|
145 |
-
document.querySelector("div#prompt2 input").setAttribute("maxlength","
|
146 |
}
|
147 |
"""
|
148 |
|
@@ -165,6 +165,7 @@ with gr.Blocks(theme=gr.themes.Soft(),css=css,js=js) as demo:
|
|
165 |
rtl=True,
|
166 |
max_lines=1
|
167 |
)
|
|
|
168 |
prompt2 = gr.Textbox(
|
169 |
elem_id="prompt2",
|
170 |
placeholder="诪讛 *诇讗* 诇讛讜住讬祝",
|
|
|
107 |
if prompt2 == None or prompt2.strip() == "":
|
108 |
_dont = 'ugly, deformed, disfigured, poor details, bad anatomy, logos, texts, labels'
|
109 |
else:
|
110 |
+
_dont = f'{prompt2_en}, {prompt2_en} where in {prompt_en}, labels where in {prompt_en}, texts, logos, ugly, deformed, disfigured, poor details, bad anatomy'
|
111 |
image = Piper(_do,_dont).images[0].save(name)
|
112 |
return name
|
113 |
|
|
|
141 |
|
142 |
js="""
|
143 |
function custom(){
|
144 |
+
document.querySelector("div#prompt input").setAttribute("maxlength","27");
|
145 |
+
document.querySelector("div#prompt2 input").setAttribute("maxlength","27");
|
146 |
}
|
147 |
"""
|
148 |
|
|
|
165 |
rtl=True,
|
166 |
max_lines=1
|
167 |
)
|
168 |
+
with gr.Row():
|
169 |
prompt2 = gr.Textbox(
|
170 |
elem_id="prompt2",
|
171 |
placeholder="诪讛 *诇讗* 诇讛讜住讬祝",
|