Intelligent content recommendation system powered by Twelve Labs and Qdrant vector database for personalized content discovery.
Content Recommendation is an open source platform that makes use of vector similarity search to provide highly relevant content recommendations. The system uses Twelve Labs, for embedding creation and Qdrant, a vector similarity search engine, to store and retrieve content based on semantic similarity rather than just keywords. This enables more intuitive and personalized content discovery for users.
- Python 3.9+
- Flask
- Twelve Labs (Generate API KEY from Twelve Labs Playground)
- Qdrant Cloud (Generate the Credentials Qdrant Cloud)
- Video Content are processed and converted into vector embeddings
- Embeddings are stored in Qdrant vector database
- Qdrant performs efficient similarity search to find relevant content
- Top matches are returned as personalized recommendations
The frontend is developed using Next.js, while the backend is powered by Flask API with CORS enabled.
├── backend-api
├── .gitignore
├── app.py
├── notebooks
│ └── Video_Content_Embedding_Creation_and_Qdrant.ipynb
├── requirements.txt
└── src
│ └── Content Reccomendation Core Architecture.png
└── www.content-reccomender.vercel.app
├── .gitignore
├── README.md
├── app
├── explore
│ ├── background.png
│ ├── loading.tsx
│ └── page.tsx
├── favicon.ico
├── global.css
├── globals.css
├── layout.tsx
└── page.tsx
├── components.json
├── components
├── navbar.tsx
├── optimized-video-grid.tsx
├── style-selector.tsx
├── ui
│ ├── button.tsx
│ ├── drawer.tsx
│ ├── input.tsx
│ └── select.tsx
├── video-grid.tsx
└── video-player.tsx
├── eslint.config.mjs
├── lib
├── api.ts
└── utils.ts
├── next.config.ts
├── package-lock.json
├── package.json
├── postcss.config.mjs
├── public
├── file.svg
├── globe.svg
├── next.svg
├── vercel.svg
└── window.svg
├── tailwind.config.ts
└── tsconfig.json
├── README.md
-
You can either use Qdrant Cloud or run Qdrant locally
- For Qdrant Cloud - Create an account at Qdrant Cloud
-
Generate the API KEY from the Twelve Labs Playground
-
Configure your connection in the
.envfile:
QDRANT_URL=your_qdrant_url
QDRANT_API_KEY=your_qdrant_api_key
API_KEY=your_twelvelabs_api_key
Clone the repository
git clone https://github.com/Hrishikesh332/Twelve-Labs-Content-Recommendation-.git
For Backend -
- To the Backend Directory
cd backend-api
- Create and activate a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies
pip install -r requirements.txt
- Configure environment variables -
QDRANT_URL=your_qdrant_url
QDRANT_API_KEY=your_qdrant_api_key
API_KEY=your_twelvelabs_api_key
- Run the backend application -
python app.py
- Navigate to
http://localhost:5000in your browse
For Frontend
- To the Frontend Directory
cd www.content-reccomender.vercel.app
- Install frontend dependencies
npm install
- Set up environment variables
Create a .env.local file in the frontend directory:
NEXT_PUBLIC_API_URL=http://localhost:5000
- Run the application -
npm run dev
- Navigate to
http://localhost:3000in your browse
The backend provides search Endpoint -
# Search for videos
curl -X POST http://localhost:5000/search \
-H "Content-Type: application/json" \
-d '{"query": "Sci Fi Robot Animation"}'
For any doubts or help you can reach out to me via [email protected] or ask in the Discord Channel

