Spaces:
Running
Running
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -49,10 +49,10 @@ def generate_random_string(length):
|
|
49 |
characters = string.ascii_letters + string.digits
|
50 |
return ''.join(random.choice(characters) for _ in range(length))
|
51 |
|
52 |
-
@spaces.GPU(duration=
|
53 |
def infer(prompt):
|
54 |
name = generate_random_string(12)+".png"
|
55 |
-
english_prompt = f'
|
56 |
print(f'Final prompt: {english_prompt}')
|
57 |
image = pipe(english_prompt).images[0].save(name)
|
58 |
return name
|
|
|
49 |
characters = string.ascii_letters + string.digits
|
50 |
return ''.join(random.choice(characters) for _ in range(length))
|
51 |
|
52 |
+
@spaces.GPU(duration=15)
|
53 |
def infer(prompt):
|
54 |
name = generate_random_string(12)+".png"
|
55 |
+
english_prompt = f'Simple genuine photograph: "{translate(prompt,"english")}" !!'
|
56 |
print(f'Final prompt: {english_prompt}')
|
57 |
image = pipe(english_prompt).images[0].save(name)
|
58 |
return name
|