Tapanat commited on
Commit
6ad65f4
·
1 Parent(s): 5c5c2a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -2,9 +2,11 @@ import streamlit as st
2
  from transformers import CLIPProcessor, CLIPModel
3
  from PIL import Image
4
  import torch
 
 
5
 
6
  # Load the pre-trained CLIP model and processor
7
- model_name = "Salesforce/blip-image-captioning-large" # You can choose a different CLIP variant if needed
8
  model = CLIPModel.from_pretrained(model_name)
9
  processor = CLIPProcessor.from_pretrained(model_name)
10
 
 
2
  from transformers import CLIPProcessor, CLIPModel
3
  from PIL import Image
4
  import torch
5
+ pip install --upgrade transformers
6
+
7
 
8
  # Load the pre-trained CLIP model and processor
9
+ model_name = "Salesforce/blip-image-captioning-large"
10
  model = CLIPModel.from_pretrained(model_name)
11
  processor = CLIPProcessor.from_pretrained(model_name)
12