Skip to content

Guess the missing parts of the prompt! A story is generated by the AI along with the images, you're required to guess the missing parts of the prompt!

License

Notifications You must be signed in to change notification settings

erickmetz/CassMantle

 
 

Repository files navigation

Logo

CassMantle

Created by and forked from https://github.com/SnowCheetos/CassMantle

Introduction

Play here! Inspired by pimantle, but with images (potentially soundtracks) and powered by a ton of AI!

You are required to guess the missing parts of the prompt (semi-randomly generated by a language model) given a blurred image (generated from the previously generated prompt with a diffusion model). The closer your guesses are to the actual answers, the less blurry the image gets! Prompts and images update every 15 minutes (as of now).

The prompts are generated in sequential fashion. A seed prompt (story name) is used to generate the first prompt, all episodes after will use the previous prompt as its seed prompt, until the maximum number of episodes are reached.

Screenshot Taken From Testing

Running CassMantle

  1. Get a Hugging Face API key
  2. Put the APK_KEY contents in api_key.txt

Without Containerization

# setup up python virtual environment
python -m venv venv

# activate virtual environment
source venv/bin/activate

# install requirements
pip install -r requirements.txt

# download NTLTK dependencies
python download_model.py

# serve application
uvicorn  main:app --host 0.0.0.0 --port 8000

With Docker

# setup up python virtual environment
python -m venv venv

# activate virtual environment
source venv/bin/activate

# install requirements
pip install -r requirements.txt

# download NTLTK dependencies
python download_model.py

# deactivate virtual environment
deactivate

# run redis container
docker run -d -p6379:6379 redis

# build image and run CassMantle
docker build -t cassmantle .
docker run cassmantle -p '8000:8000'

With Docker Compose

# setup up python virtual environment
python -m venv venv

# activate virtual environment
source venv/bin/activate

# install requirements
pip install -r requirements.txt

# download NTLTK dependencies
python download_model.py

# deactivate virtual environment
deactivate

# build image and run CassMantle
docker build -t cassmantle .

docker-compose up -d

Proxy Game (HTTPS and Websockets) through pre-existing Nginx web server

Add the following to your site configuration file (sometimes located in /etc/nginx/sites-available/your-domain-name-here) within the server {} nesting:

    location /clock {
        proxy_pass http://127.0.0.1:8000/clock;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $host;
    }

    location /app/cassmantle/ {
        proxy_pass http://127.0.0.1:8000/;
        proxy_set_header Host $host;
    }

Test configuration and restart nginx

# nginx -t && nginx -s reload

Browse to https://your-domain-name-here/app/cassmantle

About

Guess the missing parts of the prompt! A story is generated by the AI along with the images, you're required to guess the missing parts of the prompt!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 52.4%
  • Python 37.0%
  • CSS 6.6%
  • HTML 3.8%
  • Dockerfile 0.2%