Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files16 unmodified lines17181920212223242516 unmodified lines# --- MODEL LOADING (Cached) ---@st.cache_resourcedef load_models():# CLIP for labels, BLIP for captionsclassifier = pipeline("zero-shot-image-classification", model="openai/clip-vit-base-patch32", device=-1)captioner = pipeline("image-to-text", model="Salesforce/blip-image-captioning-base", device=-1)return classifier, captionerclassifier, captioner = load_models()16 unmodified lines17181920212223242526272829303116 unmodified lines# --- MODEL LOADING (Cached) ---@st.cache_resourcedef load_models():# CLIP for labelsclassifier = pipeline("zero-shot-image-classification",model="openai/clip-vit-base-patch32",device=-1)# CHANGE THIS: "image-to-text" -> "image-text-to-text"captioner = pipeline("image-text-to-text",model="Salesforce/blip-image-captioning-base",device=-1)return classifier, captionerclassifier, captioner = load_models()
src/streamlit_app.py+9-3