baudm commited on
Commit
e30d296
1 Parent(s): 51e90f5

Fix __call__ return signature when image is None

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -44,7 +44,7 @@ class App:
44
 
45
  def __call__(self, model_name, image):
46
  if image is None:
47
- return ''
48
  model = self._get_model(model_name)
49
  image = self._preprocess(image.convert('RGB')).unsqueeze(0)
50
  # Greedy decoding
 
44
 
45
  def __call__(self, model_name, image):
46
  if image is None:
47
+ return '', []
48
  model = self._get_model(model_name)
49
  image = self._preprocess(image.convert('RGB')).unsqueeze(0)
50
  # Greedy decoding