Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,7 @@ model_id = "Salesforce/blip-image-captioning-base"
|
|
| 9 |
model = BlipForConditionalGeneration.from_pretrained(model_id)
|
| 10 |
processor = BlipProcessor.from_pretrained(model_id)
|
| 11 |
|
| 12 |
-
def launch(input):
|
| 13 |
image = Image.open(requests.get(input, stream=True).raw).convert('RGB')
|
| 14 |
inputs = processor(image, return_tensors="pt")
|
| 15 |
out = model.generate(**inputs)
|
|
|
|
| 9 |
model = BlipForConditionalGeneration.from_pretrained(model_id)
|
| 10 |
processor = BlipProcessor.from_pretrained(model_id)
|
| 11 |
|
| 12 |
+
def launch(input,share=True):
|
| 13 |
image = Image.open(requests.get(input, stream=True).raw).convert('RGB')
|
| 14 |
inputs = processor(image, return_tensors="pt")
|
| 15 |
out = model.generate(**inputs)
|