Julian-Hans commited on
Commit
05aadb6
1 Parent(s): 2c9e5e4

updated test, included image in src instead of remote URL

Browse files
data/Students_taking_computerized_exam.jpg ADDED
test_blip_image_caption_large.py CHANGED
@@ -3,14 +3,14 @@ from blip_image_caption_large import Blip_Image_Caption_Large
3
  # Test the local image caption pipeline with wikipedia image
4
  def test_blip_image_caption_local_model():
5
  image_caption_model = Blip_Image_Caption_Large()
6
- image_path = "https://upload.wikimedia.org/wikipedia/commons/8/8f/Students_taking_computerized_exam.jpg"
7
  result = image_caption_model.caption_image(image_path, use_local_caption=True)
8
  assert result == "several people sitting at desks with computers in a classroom"
9
 
10
  # Test the image caption API with wikipedia image
11
  def test_blip_image_caption_api():
12
  image_caption_model = Blip_Image_Caption_Large()
13
- image_path = "https://upload.wikimedia.org/wikipedia/commons/8/8f/Students_taking_computerized_exam.jpg"
14
  result = image_caption_model.caption_image(image_path, use_local_caption=False)
15
  assert result == "several people sitting at desks with computers in a classroom"
16
 
 
3
  # Test the local image caption pipeline with wikipedia image
4
  def test_blip_image_caption_local_model():
5
  image_caption_model = Blip_Image_Caption_Large()
6
+ image_path = "data/Students_taking_computerized_exam.jpg"
7
  result = image_caption_model.caption_image(image_path, use_local_caption=True)
8
  assert result == "several people sitting at desks with computers in a classroom"
9
 
10
  # Test the image caption API with wikipedia image
11
  def test_blip_image_caption_api():
12
  image_caption_model = Blip_Image_Caption_Large()
13
+ image_path = "data/Students_taking_computerized_exam.jpg"
14
  result = image_caption_model.caption_image(image_path, use_local_caption=False)
15
  assert result == "several people sitting at desks with computers in a classroom"
16