Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -56,7 +56,7 @@ def generate_random_string(length):
|
|
56 |
@spaces.GPU(duration=20)
|
57 |
def infer(prompt):
|
58 |
name = generate_random_string(12)+".png"
|
59 |
-
english_prompt =
|
60 |
print(f'Final prompt: {english_prompt}')
|
61 |
image = pipe(english_prompt).images[0].save(name)
|
62 |
return name
|
|
|
56 |
@spaces.GPU(duration=20)
|
57 |
def infer(prompt):
|
58 |
name = generate_random_string(12)+".png"
|
59 |
+
english_prompt = 'The "' + re.sub(f'[{string.punctuation}]', '', re.sub('[\s+]', ' ', translate(prompt,"en"))).upper().strip() + '" authentically labels-free genuine accurate:'
|
60 |
print(f'Final prompt: {english_prompt}')
|
61 |
image = pipe(english_prompt).images[0].save(name)
|
62 |
return name
|