Update app.py
Browse files
app.py
CHANGED
@@ -11,8 +11,8 @@ model = BlipForConditionalGeneration.from_pretrained(model_id)
|
|
11 |
processor = BlipProcessor.from_pretrained(model_id)
|
12 |
|
13 |
def launch(input):
|
14 |
-
image = Image.open(requests.get(input, stream=True).raw).convert('RGB')
|
15 |
-
inputs = processor(
|
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 |
+
#image = Image.open(requests.get(input, stream=True).raw).convert('RGB')
|
15 |
+
inputs = processor(input, return_tensors="pt")
|
16 |
out = model.generate(**inputs)
|
17 |
return processor.decode(out[0], skip_special_tokens=True)
|
18 |
|