Spaces:
Running
Running
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -59,8 +59,8 @@ def generate_random_string(length):
|
|
| 59 |
return ''.join(random.choice(characters) for _ in range(length))
|
| 60 |
|
| 61 |
@spaces.GPU
|
| 62 |
-
def
|
| 63 |
-
return
|
| 64 |
english_prompt,
|
| 65 |
height=192,
|
| 66 |
width=192,
|
|
@@ -73,7 +73,7 @@ def infer(prompt):
|
|
| 73 |
name = generate_random_string(12)+".png"
|
| 74 |
english_prompt = f'TRUE {translate(prompt,"english").upper()}:'
|
| 75 |
print(f'Final prompt: {english_prompt}')
|
| 76 |
-
image =
|
| 77 |
return name
|
| 78 |
|
| 79 |
css="""
|
|
|
|
| 59 |
return ''.join(random.choice(characters) for _ in range(length))
|
| 60 |
|
| 61 |
@spaces.GPU
|
| 62 |
+
def Piper(english_prompt):
|
| 63 |
+
return pipe(
|
| 64 |
english_prompt,
|
| 65 |
height=192,
|
| 66 |
width=192,
|
|
|
|
| 73 |
name = generate_random_string(12)+".png"
|
| 74 |
english_prompt = f'TRUE {translate(prompt,"english").upper()}:'
|
| 75 |
print(f'Final prompt: {english_prompt}')
|
| 76 |
+
image = Piper(english_prompt).images[0].save(name)
|
| 77 |
return name
|
| 78 |
|
| 79 |
css="""
|