- Pull the Cassandra image from Docker Hub
docker pull cassandra:latest
- Run the Cassandra container
docker run --rm -d --name cassandra --hostname cassandra --network cassandra -p 9042:9042 cassandra
- Wait for 1-2 mins for the container to start and then connect to the CQL shell
docker exec -it cassandra cqlsh -u cassandra -p cassandra localhost 9042
- Run the following commands one by one in the CQL shell to create a keyspace and a table
CREATE KEYSPACE IF NOT EXISTS video_search
WITH REPLICATION = {
'class' : 'SimpleStrategy',
'replication_factor' : 1
};
USE video_search;
CREATE TABLE IF NOT EXISTS videos (
id UUID PRIMARY KEY,
name TEXT,
hash TEXT,
upload_time TIMESTAMP
);
CREATE TABLE IF NOT EXISTS frame_embeddings (
video_id UUID,
frame_timestamp TEXT,
embedding VECTOR <FLOAT, 512>,
PRIMARY KEY (video_id, frame_timestamp)
);
- Clone the repository
git clone https://github.com/Swapnil-Kapale/FrameSeek
- Setup the environment
cd FrameSeek
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- Run the application
python app2.py
- The application will be running on http://localhost:5000