Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -59,7 +59,7 @@ if image_url:
|
|
59 |
logits_per_image = outputs.logits_per_image # this is the image-text similarity score
|
60 |
probs = logits_per_image.softmax(dim=1) # we can take the softmax to get the label probabilities
|
61 |
raw_context= scene_labels[probs.argmax(-1)]
|
62 |
-
context= 'the image is depicting scene of '+
|
63 |
|
64 |
##BLIP
|
65 |
caption = image_to_text(image_url, max_new_tokens=200)
|
|
|
59 |
logits_per_image = outputs.logits_per_image # this is the image-text similarity score
|
60 |
probs = logits_per_image.softmax(dim=1) # we can take the softmax to get the label probabilities
|
61 |
raw_context= scene_labels[probs.argmax(-1)]
|
62 |
+
context= 'the image is depicting scene of '+ raw_context
|
63 |
|
64 |
##BLIP
|
65 |
caption = image_to_text(image_url, max_new_tokens=200)
|