Spaces:
Build error
Build error
Update app.py
Browse files
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"
|
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 |
|