Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -72,8 +72,8 @@ def Piper(_do):
|
|
72 |
height=480,
|
73 |
width=480,
|
74 |
negative_prompt="",
|
75 |
-
num_inference_steps=
|
76 |
-
guidance_scale=
|
77 |
)
|
78 |
|
79 |
def infer(prompt1,prompt2,prompt3,prompt4):
|
@@ -84,24 +84,24 @@ def infer(prompt1,prompt2,prompt3,prompt4):
|
|
84 |
else:
|
85 |
prompt4 = " or " + " or ".join([translate(v,"english").upper() for v in prompt4])
|
86 |
|
87 |
-
_dont = f'
|
88 |
|
89 |
if prompt1 == None:
|
90 |
prompt1 = "element"
|
91 |
else:
|
92 |
-
prompt1 = ", and ".join([ (translate(v,"english").upper()
|
93 |
|
94 |
if prompt2 == None:
|
95 |
prompt2 = "elements"
|
96 |
else:
|
97 |
-
prompt2 = ", and ".join([ (translate(v,"english").upper()
|
98 |
|
99 |
if prompt3 == None:
|
100 |
prompt3 = "event"
|
101 |
else:
|
102 |
prompt3 = " ".join([translate(v,"english").upper() for v in prompt3]) + " event"
|
103 |
|
104 |
-
_do = f'
|
105 |
print(_do)
|
106 |
image = Piper(_do).images[0].save(name)
|
107 |
return name
|
|
|
72 |
height=480,
|
73 |
width=480,
|
74 |
negative_prompt="",
|
75 |
+
num_inference_steps=200,
|
76 |
+
guidance_scale=9
|
77 |
)
|
78 |
|
79 |
def infer(prompt1,prompt2,prompt3,prompt4):
|
|
|
84 |
else:
|
85 |
prompt4 = " or " + " or ".join([translate(v,"english").upper() for v in prompt4])
|
86 |
|
87 |
+
_dont = f'Show TEXT or LOGO{prompt4}.'
|
88 |
|
89 |
if prompt1 == None:
|
90 |
prompt1 = "element"
|
91 |
else:
|
92 |
+
prompt1 = ", and ".join([ (translate(v,"english").upper()) for v in prompt1 ])
|
93 |
|
94 |
if prompt2 == None:
|
95 |
prompt2 = "elements"
|
96 |
else:
|
97 |
+
prompt2 = ", and ".join([ (translate(v,"english").upper()) for v in prompt2 ])
|
98 |
|
99 |
if prompt3 == None:
|
100 |
prompt3 = "event"
|
101 |
else:
|
102 |
prompt3 = " ".join([translate(v,"english").upper() for v in prompt3]) + " event"
|
103 |
|
104 |
+
_do = f'Show {prompt3}; Include {prompt2}; Focus on {prompt1}.'
|
105 |
print(_do)
|
106 |
image = Piper(_do).images[0].save(name)
|
107 |
return name
|