title | emoji | colorFrom | colorTo | sdk | pinned | license | short_description |
---|---|---|---|---|---|---|---|
Qdrant Webinar: Cloud Inference |
🖼️ |
blue |
yellow |
docker |
false |
apache-2.0 |
Personal Image Catalog |
This repository contains materials from the hands-on webinar "How to Build a Multimodal Search Stack with One API". It implements a personal image catalog that can be searched by image or text, with additional object detection capabilities.
The project is built using Python and JavaScript, integrating with external services through their APIs. The multimodal search capabilities are implemented using Qdrant Cloud Inference, with FastAPI serving as the backend API and a modern frontend built with Vite and DaisyUI.
This project requires Qdrant Cloud as it uses Cloud Inference features that are not available in local Qdrant instances.
You'll need to sign up for a free account on Qdrant Cloud to get:
- A cluster URL to connect to your instance
- An API key for authentication
- Access to Cloud Inference capabilities
You'll need Python 3.10 or higher installed, and we recommend using uv for dependency management. For the frontend, you'll need Node.js 18 or higher.
Since we'll be working with cloud inference, no GPU access is required. Install all necessary libraries with a single command:
# Backend dependencies
cd backend-app
uv sync
# Frontend dependencies
cd ../frontend-app
npm install
The project uses different models for different tasks, specifically:
- YOLO for object detection
- CLIP for vision-language embeddings
- Qdrant Cloud Inference for vector operations
While you can swap these models with alternatives in the code, we cannot guarantee the system will maintain the same performance level.
Create a .env
file in the backend-app
directory with the following entries:
# Qdrant configuration
QDRANT_URL=your_qdrant_cluster_url
QDRANT_API_KEY=your_qdrant_api_key
QDRANT_COLLECTION_NAME=your_collection_name
# YOLO Model Configuration (optional)
YOLO_MODEL=yolo11s.pt
# Feature Flags (optional)
ENABLE_INGEST=true
You can rename .env.example
to .env
and fill in the values, or set these as environment variables.
The application supports feature flags to control functionality:
- ENABLE_INGEST: Controls whether the ingest functionality is available. When set to
false
, both the frontend and backend will hide the ingest features. Defaults totrue
.
Since this project uses Cloud Inference features, you must use Qdrant Cloud. After signing up:
- Create a new cluster in your Qdrant Cloud dashboard
- Note your cluster URL and API key
- Use these credentials in your
.env
file
The Cloud Inference feature allows creating vectors from raw data by sending it directly to the Qdrant cloud instance, eliminating the need for local model inference.
For development, you can run the services separately:
-
Navigate to backend directory
cd backend-app
-
Install dependencies
uv sync
-
Configure environment variables Create a
.env
file in thebackend-app
directory with your Qdrant credentials. -
Setup Qdrant collection
uv run python setup.py
-
Start the backend server
# For development with uvicorn uv run uvicorn main:app --reload --host 0.0.0.0 --port 7860 # For production with gunicorn uv run gunicorn main:app -c gunicorn.conf.py
-
Navigate to frontend directory
cd frontend-app
-
Install dependencies
npm install
-
Start the development server
npm run dev
For production, use the unified Docker container (see Docker Deployment section above).
Once the backend is running, visit:
- Interactive API docs: http://localhost:7860/docs
- ReDoc documentation: http://localhost:7860/redoc
Via API:
curl -X POST "http://localhost:7860/api/v1/ingest" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/image.jpg"}'
Via API:
curl "http://localhost:7860/api/v1/search?query=cat%20sitting%20on%20a%20chair&limit=5"
Via Frontend:
Open http://localhost:7860 and use the web interface.
The project uses a unified Docker container that combines both the backend API and frontend application. This simplifies deployment and reduces resource usage.
-
Build the unified container:
# Using the build script ./build.sh # Or manually docker build -t webinar-app .
-
Run the application:
# With environment variables docker run -p 7860:7860 --env-file .env webinar-app # Or with inline environment variables docker run -p 7860:7860 \ -e QDRANT_URL=your_qdrant_cluster_url \ -e QDRANT_API_KEY=your_qdrant_api_key \ -e QDRANT_COLLECTION_NAME=your_collection_name \ webinar-app
-
Access the application:
- Frontend: http://localhost:7860
- API Documentation: http://localhost:7860/docs
- Health Check: http://localhost:7860/health
Create a .env
file in the root directory with your Qdrant credentials:
QDRANT_URL=your_qdrant_cluster_url
QDRANT_API_KEY=your_qdrant_api_key
QDRANT_COLLECTION_NAME=your_collection_name
For a detailed explanation of the system and its components, refer to the webinar recording and the source code in this repository.