flaviagiammarino commited on
Commit
3422451
1 Parent(s): d509e83

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -40,7 +40,7 @@ processor = CLIPProcessor.from_pretrained("flaviagiammarino/pubmed-clip-vit-base
40
  url = "https://d168r5mdg5gtkq.cloudfront.net/medpix/img/full/synpic9078.jpg"
41
  image = Image.open(requests.get(url, stream=True).raw)
42
 
43
- inputs = processor(text=["Chest X-Ray", "Brain MRI", "Abdominal CT Scan"], images=image, return_tensors="pt", padding=True)
44
  outputs = model(**inputs)
45
  logits_per_image = outputs.logits_per_image # this is the image-text similarity score
46
  probs = logits_per_image.softmax(dim=1) # we can take the softmax to get the label probabilities
 
40
  url = "https://d168r5mdg5gtkq.cloudfront.net/medpix/img/full/synpic9078.jpg"
41
  image = Image.open(requests.get(url, stream=True).raw)
42
 
43
+ inputs = processor(text=["Chest X-Ray", "Brain MRI", "Abdomen CT Scan"], images=image, return_tensors="pt", padding=True)
44
  outputs = model(**inputs)
45
  logits_per_image = outputs.logits_per_image # this is the image-text similarity score
46
  probs = logits_per_image.softmax(dim=1) # we can take the softmax to get the label probabilities