Update app.py
Browse files
app.py
CHANGED
@@ -12,8 +12,8 @@ processor = BlipProcessor.from_pretrained(model_id)
|
|
12 |
|
13 |
def launch(input):
|
14 |
inputs = []
|
15 |
-
for
|
16 |
-
inputs.append(processor(
|
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)
|