moul_lmemes / readme.md
oumayma03's picture
Upload readme.md with huggingface_hub
05b9899 verified

A newer version of the Gradio SDK is available: 5.47.2

Upgrade

Meme RAG Hugging Face Space 🎬

Welcome to the Meme RAG Hugging Face Space! This application allows you to find relevant memes based on your text query using a Retrieval-Augmented Generation (RAG) system.

How to Use

  1. Simply enter your text query in the input box.
  2. Click the "Submit" button.
  3. The application will return an answer from the LLM based on relevant memes and a list of the top matching memes with their descriptions and links.

Project Description

This project implements a RAG architecture to retrieve and generate information about memes. It utilizes:

  • Data: A dataset of memes with descriptions and links (sourced from a Google Sheet).
  • Embeddings: HuggingFace's intfloat/multilingual-e5-large-instruct model to create vector representations of meme descriptions.
  • Vector Store: FAISS for efficient similarity search of meme embeddings.
  • Retriever: Langchain's retriever to fetch relevant meme documents based on the user query.
  • LLM: OpenRouter's access to the qwen/qwen3-32b:free model to generate a natural language response based on the retrieved meme information.
  • Interface: Gradio to provide a user-friendly web interface.

RAG Architecture

The system works by first embedding the user's query and searching the FAISS vector store to retrieve the most relevant meme descriptions. These retrieved documents are then provided as context to the Language Model (LLM), which generates a coherent and informative response, including identifying the most accurate meme and listing the top matches with their links.

Data and Models

  • Data Source: Memes and descriptions from a Google Sheet.
  • Embedding Model: intfloat/multilingual-e5-large-instruct from HuggingFace.
  • LLM: qwen/qwen3-32b:free accessed via OpenRouter.

Requirements

The necessary Python libraries are listed in requirements.txt and are automatically installed in the Hugging Face Space environment.

Acknowledgements

  • Hugging Face for providing the platform for this Space.
  • The creators of the dataset.
  • HuggingFace and OpenRouter for the models used.