Spaces:
Running
Running
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -78,10 +78,11 @@ def generate_random_string(length):
|
|
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=448,
|
86 |
width=448,
|
87 |
num_inference_steps=8,
|
@@ -99,8 +100,10 @@ def infer(p1,p2):
|
|
99 |
else:
|
100 |
_do = f'{ p1 }, beautiful, playful, photographed, highly detailed, realistic elements, dynamic poze, deep field, vivid reasonable coloring, rough texture, high sharpness, highres, best quality, focused'
|
101 |
if p2 != "":
|
102 |
-
|
103 |
-
|
|
|
|
|
104 |
if output == "":
|
105 |
return output
|
106 |
else:
|
|
|
78 |
return ''.join(random.choice(characters) for _ in range(length))
|
79 |
|
80 |
@spaces.GPU(duration=45)
|
81 |
+
def Piper(_do,_do2):
|
82 |
try:
|
83 |
retu = pipe(
|
84 |
_do,
|
85 |
+
prompt_2=_do2,
|
86 |
height=448,
|
87 |
width=448,
|
88 |
num_inference_steps=8,
|
|
|
100 |
else:
|
101 |
_do = f'{ p1 }, beautiful, playful, photographed, highly detailed, realistic elements, dynamic poze, deep field, vivid reasonable coloring, rough texture, high sharpness, highres, best quality, focused'
|
102 |
if p2 != "":
|
103 |
+
_do2 = f'Please delete the {p2} where in {p1}!'
|
104 |
+
else:
|
105 |
+
_do2 = ""
|
106 |
+
output = Piper(_do,_do2)
|
107 |
if output == "":
|
108 |
return output
|
109 |
else:
|