Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -77,14 +77,14 @@ def generate_random_string(length):
|
|
77 |
characters = string.ascii_letters + string.digits
|
78 |
return ''.join(random.choice(characters) for _ in range(length))
|
79 |
|
80 |
-
@spaces.GPU(duration=
|
81 |
def Piper(_do):
|
82 |
try:
|
83 |
retu = pipe(
|
84 |
_do,
|
85 |
-
height=
|
86 |
-
width=
|
87 |
-
num_inference_steps=
|
88 |
max_sequence_length=256,
|
89 |
guidance_scale=0
|
90 |
)
|
@@ -98,8 +98,8 @@ def infer(p1,p2):
|
|
98 |
if p1 != "":
|
99 |
_do.append(f'{p1}')
|
100 |
if p2 != "":
|
101 |
-
_do.append(f'
|
102 |
-
output = Piper('
|
103 |
if output == "":
|
104 |
return output
|
105 |
else:
|
|
|
77 |
characters = string.ascii_letters + string.digits
|
78 |
return ''.join(random.choice(characters) for _ in range(length))
|
79 |
|
80 |
+
@spaces.GPU(duration=45)
|
81 |
def Piper(_do):
|
82 |
try:
|
83 |
retu = pipe(
|
84 |
_do,
|
85 |
+
height=1024,
|
86 |
+
width=1024,
|
87 |
+
num_inference_steps=10,
|
88 |
max_sequence_length=256,
|
89 |
guidance_scale=0
|
90 |
)
|
|
|
98 |
if p1 != "":
|
99 |
_do.append(f'{p1}')
|
100 |
if p2 != "":
|
101 |
+
_do.append(f'hiding a small ugly {p2}')
|
102 |
+
output = Piper('A '+" ".join(_do))
|
103 |
if output == "":
|
104 |
return output
|
105 |
else:
|