Update app.py
Browse files
app.py
CHANGED
@@ -13,8 +13,7 @@ processor = BlipProcessor.from_pretrained(model_id)
|
|
13 |
def launch(input):
|
14 |
inputs = []
|
15 |
for file in input:
|
16 |
-
|
17 |
-
inputs.append(processor(Image.open(fo), return_tensors="pt"))
|
18 |
|
19 |
out = model.generate(**inputs)
|
20 |
return processor.decode(out[0], skip_special_tokens=True)
|
|
|
13 |
def launch(input):
|
14 |
inputs = []
|
15 |
for file in input:
|
16 |
+
inputs.append(processor(Image.open(file.name), return_tensors="pt"))
|
|
|
17 |
|
18 |
out = model.generate(**inputs)
|
19 |
return processor.decode(out[0], skip_special_tokens=True)
|