Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ from transformers import pipeline
|
|
6 |
from datasets import load_dataset
|
7 |
|
8 |
def img2text(url):
|
9 |
-
image_to_text_model = pipeline("image-to-text", model="Salesforce/blip-image-captioning-
|
10 |
text = image_to_text_model(url)[0]["generated_text"]
|
11 |
return text
|
12 |
|
|
|
6 |
from datasets import load_dataset
|
7 |
|
8 |
def img2text(url):
|
9 |
+
image_to_text_model = pipeline("image-to-text", model="Salesforce/blip-image-captioning-large", use_fast=True)
|
10 |
text = image_to_text_model(url)[0]["generated_text"]
|
11 |
return text
|
12 |
|