Skip to content
This repository has been archived by the owner on Jan 14, 2023. It is now read-only.

Weaviate demo dataset with game walkthroughs

Notifications You must be signed in to change notification settings

rahmatnazali/DEMO-GameWalkthroughs

 
 

Repository files navigation

Game Walkthroughs Weaviate demo Weaviate logo

A Weaviate demo dataset with game walkthroughs.

Build Status

Branch Status
Master Build Status

Running the demo

Requirements

  • python 3 and venv
  • docker and docker-compose are installed

Spin up the service

docker-compose up -d

It may take a while to download the image. After the service is up we still need some time until weaviate is reachable by url (around 30 secs - 1 minute). To check if the graph is reachable, simply open http://localhost:8080/ and see if there is any response from the graph.

While waiting for it, we can configure the data seed.

Configure how we populate the data

Game data

  • We can populate the game data inside games file

  • Game data is formatted as: [Game name];[Developer name];[Genre(s) - comma separated];[Platform(s) - comma separated]

  • Example:

    GTA V;Rockstar Games;Action-adventure Game,First-person Shooter;PlayStation 3,PlayStation 4,PlayStation 5,Xbox One,Xbox 360,Xbox Series X,Microsoft Windows
    

    This will later be interpreted as:

    • create a Game instance named GTA V with developer of Rockstar Game
    • create 2 genres of Action-adventure Game and First-person Shooter, and later associate both of it with GTA V
    • create 7 platforms and associate all of it with GTA V
  • All creation are get_or_create method, so same instance will not be duplicated.

Video and Subtitle data

  • We can populate the video and its subtitle data inside video_links file
  • Game data is formatted as: [Game name];[Video link from Youtube]
  • example: GTA V;https://www.youtube.com/watch?v=Vncf_9LLagc
  • The script will get the video's metadata and its Youtube generated auto caption using youtube-dl, create an instance inside the graph and associate with the Game

Running the script

  • Create python 3 venv, get into it, and install all the requirement

    pip3 install -r requirements.txt
    
  • Make sure that weaviate is reachable by opening http://localhost:8080/, if there is any 200 response then it should be good

Creating schema

  • Create the schema by running create_schema.py:
python3 project/create_schema.py

By now, if you open the weaviate playground pointed on your localhost and check all the schema you will see something like this:

capture_01.png

Populating schema

  • Populate the schema by running populate schema.py
python3 project/create_schema.py

It will take quite a moment according how much the videos is listed and duration of each video.

After done, we will get soemthing like this:

capture_03.png

We can now query or explore the data.

About

Weaviate demo dataset with game walkthroughs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.9%
  • Shell 0.1%