Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -40,7 +40,6 @@ def translate(text,lang):
|
|
40 |
'Mozilla/5.0 (Macintosh; Intel Mac OS X 13_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15'
|
41 |
]
|
42 |
url = 'https://www.google.com/search'
|
43 |
-
print(url)
|
44 |
resp = requests.get(
|
45 |
url = url,
|
46 |
params = {'q': f'{lang} translate {text}'},
|
@@ -77,14 +76,14 @@ def Piper(_do):
|
|
77 |
_do,
|
78 |
height=448,
|
79 |
width=448,
|
80 |
-
negative_prompt='
|
81 |
-
num_inference_steps=
|
82 |
-
guidance_scale=
|
83 |
)
|
84 |
|
85 |
def infer(prompt):
|
86 |
name = generate_random_string(12)+".png"
|
87 |
-
_do = f'
|
88 |
image = Piper(_do).images[0].save(name)
|
89 |
return name
|
90 |
|
|
|
40 |
'Mozilla/5.0 (Macintosh; Intel Mac OS X 13_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15'
|
41 |
]
|
42 |
url = 'https://www.google.com/search'
|
|
|
43 |
resp = requests.get(
|
44 |
url = url,
|
45 |
params = {'q': f'{lang} translate {text}'},
|
|
|
76 |
_do,
|
77 |
height=448,
|
78 |
width=448,
|
79 |
+
negative_prompt='vivid colors; text; logo',
|
80 |
+
num_inference_steps=125,
|
81 |
+
guidance_scale=9
|
82 |
)
|
83 |
|
84 |
def infer(prompt):
|
85 |
name = generate_random_string(12)+".png"
|
86 |
+
_do = f'acrylic colors; { translate(prompt,"english") }; photograph-like real'.upper()
|
87 |
image = Piper(_do).images[0].save(name)
|
88 |
return name
|
89 |
|