Update app.py
Browse files
app.py
CHANGED
@@ -11,8 +11,10 @@ model = BlipForConditionalGeneration.from_pretrained(model_id)
|
|
11 |
processor = BlipProcessor.from_pretrained(model_id)
|
12 |
|
13 |
def launch(input):
|
14 |
-
|
15 |
-
|
|
|
|
|
16 |
out = model.generate(**inputs)
|
17 |
return processor.decode(out[0], skip_special_tokens=True)
|
18 |
|
|
|
11 |
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)
|
20 |
|