Welcome to From Pixels to Knowledge, an AI-powered workshop where we turn raw images into structured data and searchable knowledge graphs using the latest in multimodal AI and graph technologies.
In this workshop, you'll build an interactive app using Streamlit that:
- Extracts structured data from car images using Gemini API
- Converts images and text to vector embeddings using CLIP
- Stores and queries data in Memgraph as a knowledge graph
- Supports vector search and text-based querying with NLP-powered answers
Instead of Docker CE you can use Rancher Desktop - a full OpenSource solution.
We recommend you to start Docker Compose at least once before the workshop. After cloning this repository, and when you have a stable internet connection, do like described under 🚀 Running the App.
cd Weblica-Workshop-GraphRAG
python -m venv .venv
This will create a
.venv
directory in your project root.
- On Linux/macOS:
source .venv/bin/activate
- On Windows:
.venv\Scripts\activate
Once activated, your shell prompt should show
(.venv)
in front.
Install all Python dependencies using pip:
pip install -r requirements.txt
Make sure you completed the previous two steps so that all packages are installed inside the virtual environment, keeping your global Python environment clean and avoiding version conflicts.
Create a .env file in the project root:
- On Linux/macOS:
echo GEMINI_API_KEY=your_gemini_api_key > .env
- On Windows:
echo "GEMINI_API_KEY=your_gemini_api_key" > .env
Make sure to enable Generative AI access in your Google Cloud project and create an API key.
!! Google Cloud projects are free for developers, you don't have to worry about billing.
Start Memgraph and Memgraph lab using docker compose. This will pull memgraph-lab and memgraph docker images and would take some time, depending on your internet connection speed - both images are aprox. 450MB in total.
git clone https://github.com/revaddu/Weblica-Workshop-GraphRAG.git ./
docker compose up
You can also start Docker containers in detached mode:
docker compose up -d
Start the Streamlit App:
streamlit run app.py
- Upload an image of a car
- Extract car info with Gemini
- Convert to vector using CLIP
- Search similar cars in Memgraph
- Input a textual prompt
- Convert it to a vector
- Search Memgraph and visualize results
- Let Gemini answer your question with the help of graph data
- Upload up to 15 images at once
- Automatically extract metadata
- Store them in Memgraph for later querying
.
├── images/ # Images for the demo
├── app.py # Main Streamlit app
├── requirements.txt # Python dependencies
├── .env # API keys and secrets
├── docker-compose.yml # Docker compose file for memgraph
└── README.md # You're here!