andito HF staff commited on
Commit
ab94263
1 Parent(s): d10f7de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -26,7 +26,9 @@ def model_inference(
26
  if len(input_dict["files"]) > 1:
27
  images = [Image.open(image).convert("RGB") for image in input_dict["files"]]
28
  elif len(input_dict["files"]) == 1:
29
- images = [Image.open(input_dict["files"][0]).convert("RGB")]
 
 
30
 
31
 
32
  if text == "" and not images:
 
26
  if len(input_dict["files"]) > 1:
27
  images = [Image.open(image).convert("RGB") for image in input_dict["files"]]
28
  elif len(input_dict["files"]) == 1:
29
+ images = [Image.open(input_dict["files"][0]).convert("RGB")]
30
+ else:
31
+ images = []
32
 
33
 
34
  if text == "" and not images: