Yaron Koresh commited on
Commit
3420a9a
·
verified ·
1 Parent(s): b6863a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
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
- _do = f'fully transparent and negative {p2} where in {p1}, {_do}, fully transparent and negative {p2} where in {p1}'
103
- output = Piper(_do)
 
 
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: