Downloads · 30 days
12
2% of all-time downloads
anaaa2/moralclip-base
moralclip-base is a zero-shot image classification model from anaaa2. Use it for the zero-shot image classification task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as mit.
MoralCLIP extends CLIP with explicit moral grounding based on Moral Foundations Theory (MFT). This model aligns image and text representations by shared moral meaning rather than purely semantic similarity.
Downloads · 30 days
12
2% of all-time downloads
All-time downloads
666
Public
Parameters
150M
599 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors599 MB · 99%
From the Hugging Face model README
MoralCLIP extends CLIP with explicit moral grounding based on Moral Foundations Theory (MFT). This model aligns image and text representations by shared moral meaning rather than purely semantic similarity.
from transformers import CLIPModel, CLIPProcessor
from PIL import Image
import torch
model = CLIPModel.from_pretrained("anaaa2/moralclip-base")
processor = CLIPProcessor.from_pretrained("anaaa2/moralclip-base")
img = Image.open("image_path").convert("RGB")
inputs = processor(text=["a photo of care"], images=image, return_tensors="pt", padding=True)
outputs = model(**inputs)
image_embeds = outputs.image_embeds
text_embeds = outputs.text_embeds