shtif commited on
Commit
f23e620
·
1 Parent(s): 8f26b20

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,8 +12,8 @@ processor = BlipProcessor.from_pretrained(model_id)
12
 
13
  def launch(input):
14
  inputs = []
15
- for image in input:
16
- inputs.append(processor(image, return_tensors="pt"))
17
 
18
  out = model.generate(**inputs)
19
  return processor.decode(out[0], skip_special_tokens=True)
 
12
 
13
  def launch(input):
14
  inputs = []
15
+ for file in input:
16
+ inputs.append(processor(Image.open(file), return_tensors="pt"))
17
 
18
  out = model.generate(**inputs)
19
  return processor.decode(out[0], skip_special_tokens=True)