chats-bug commited on
Commit
30c66b8
·
1 Parent(s): 7295a68

Trying image transformations

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -139,6 +139,8 @@ def generate_captions(
139
  if use_sample_image:
140
  url = "http://images.cocodataset.org/val2017/000000039769.jpg"
141
  image = Image.open(requests.get(url, stream=True).raw)
 
 
142
 
143
  # Generate captions for the image using the Blip base model
144
  try:
 
139
  if use_sample_image:
140
  url = "http://images.cocodataset.org/val2017/000000039769.jpg"
141
  image = Image.open(requests.get(url, stream=True).raw)
142
+ else:
143
+ image = Image.open(image)
144
 
145
  # Generate captions for the image using the Blip base model
146
  try: