Jangai commited on
Commit
8e6a6ad
·
verified ·
1 Parent(s): 5342f17

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -3,7 +3,7 @@ from transformers import pipeline
3
  from PIL import Image
4
 
5
  # Initialize the pipeline with the image captioning model
6
- caption_pipeline = pipeline("image-to-text", model="nlpconnect/vit-gpt2-image-captioning")
7
 
8
  def generate_caption(image):
9
  # The image is received as a PIL Image, so no need for conversion
 
3
  from PIL import Image
4
 
5
  # Initialize the pipeline with the image captioning model
6
+ caption_pipeline = pipeline("image-to-text", model="Salesforce/blip-image-captioning-large")
7
 
8
  def generate_caption(image):
9
  # The image is received as a PIL Image, so no need for conversion