Yaron Koresh commited on
Commit
52c6881
·
verified ·
1 Parent(s): b66cda8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -94,7 +94,8 @@ def Piper(_do,_dont):
94
  )
95
  return retu
96
  except:
97
- return ""
 
98
 
99
  def infer(p1,p2):
100
  name = generate_random_string(12)+".png"
@@ -106,7 +107,7 @@ def infer(p1,p2):
106
  else:
107
  _dont = ""
108
  output = Piper('A '+" ".join(_do),_dont)
109
- if output == "":
110
  return output
111
  else:
112
  output.images[0].save(name)
 
94
  )
95
  return retu
96
  except:
97
+ print("returning None!")
98
+ return None
99
 
100
  def infer(p1,p2):
101
  name = generate_random_string(12)+".png"
 
107
  else:
108
  _dont = ""
109
  output = Piper('A '+" ".join(_do),_dont)
110
+ if output == None:
111
  return output
112
  else:
113
  output.images[0].save(name)