CoolFace
Apppublic

muzammal-shafique/hateful-memes-classifier

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes
App README

Hateful Meme Classifier ๐Ÿšซ๐Ÿ–ผ๏ธ๐Ÿค–

This is a Gradio web application that classifies memes as hateful or not hateful. It uses a fine-tuned CLIP model that analyzes both image and text in a meme to detect hatefulness.

How to Use

  • โ€”Upload a meme image (JPEG/PNG) using the file uploader. (If the meme has text, the model will analyze the image and embedded text together.)
  • โ€”Click Submit. The model will output either "Hateful Meme" or "Not Hateful".
  • โ€”Results also include a confidence score.

Model Details

  • โ€”The model is based on OpenAI's CLIP (ViT-B/32) architecture, fine-tuned on the Facebook Hateful Memes challenge data.
  • โ€”Model file size is ~300MB. It is included in this app for inference.
  • โ€”The CLIPProcessor is used to preprocess images (and text).

About

  • โ€”Author: Muzammal Shafique
  • โ€”Dataset: Facebook Hateful Memes (2020), containing multimodal memes with labels.

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference