Spaces:
Sleeping
Sleeping
File size: 359 Bytes
9ef2a14 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
# external imports
from transformers import pipeline
# local imports
import config
class Blip_Image_Caption_Large:
def __init__(self):
self.local_pipeline = pipeline("image-to-text", model=config.IMAGE_CAPTION_MODEL)
def caption_image_local_pipeline(self, image_path):
result = self.local_pipeline(image_path)
return result
|