Spaces:
Running
Running
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -58,17 +58,17 @@ def generate_random_string(length):
|
|
58 |
characters = string.ascii_letters + string.digits
|
59 |
return ''.join(random.choice(characters) for _ in range(length))
|
60 |
|
61 |
-
@spaces.GPU
|
62 |
def infer(prompt):
|
63 |
name = generate_random_string(12)+".png"
|
64 |
english_prompt = f'TRUE {translate(prompt,"english").upper()}:'
|
65 |
print(f'Final prompt: {english_prompt}')
|
66 |
image = pipe(
|
67 |
english_prompt,
|
68 |
-
height=
|
69 |
-
width=
|
70 |
negative_prompt="",
|
71 |
-
num_inference_steps=
|
72 |
guidance_scale=10.0
|
73 |
).images[0].save(name)
|
74 |
return name
|
|
|
58 |
characters = string.ascii_letters + string.digits
|
59 |
return ''.join(random.choice(characters) for _ in range(length))
|
60 |
|
61 |
+
@spaces.GPU
|
62 |
def infer(prompt):
|
63 |
name = generate_random_string(12)+".png"
|
64 |
english_prompt = f'TRUE {translate(prompt,"english").upper()}:'
|
65 |
print(f'Final prompt: {english_prompt}')
|
66 |
image = pipe(
|
67 |
english_prompt,
|
68 |
+
height=1024,
|
69 |
+
width=1024,
|
70 |
negative_prompt="",
|
71 |
+
num_inference_steps=50,
|
72 |
guidance_scale=10.0
|
73 |
).images[0].save(name)
|
74 |
return name
|