This repository holds the implementation of the Creative Wand
framework, along with an exemplar implementation in text
domain.
For more details on what this is, feel free to check Creative Wand: A System to Study Effects of Communications in Co-Creative Settings by Zhiyu Lin, Rohan Agarwal, and Mark Riedl.
- Create a conda environment using provided
conda_env.yaml
:conda env create -f conda_env.yml
conda activate creative-wand
pip install -e .
and you will haveCreativeWand.Framework
available in your workspace.
- Create a conda environment using provided
conda_env.yaml
:conda env create -f conda_env.yml
conda activate creative-wand
- (Optional) Install apex library (Needed for loading models in half precisions (conserve memory): https://github.com/NVIDIA/apex
- Set up Addons
- Clone https://github.com/eilab-gt/plug-and-blend-tool into
Addons/PNB
and rename the folderpnb2
(Or changeendpoint.py
accordingly) - Check
AddonConfig.py
and change paths accordingly- Download https://storage.googleapis.com/sfr-gedi-data/gedi_topic.zip , unzip it somewhere and
point
gedi_location
there; - for
base_location
input a desiredhuggingface
gpt2
-compatible model (either a model name or a path to given model), or usegptj
following the config sample. - We used
gptj
for our experiments, which requires a lot of VRAM. all functions work with anygpt
-compatible models, although what is generated will be different.
- Download https://storage.googleapis.com/sfr-gedi-data/gedi_topic.zip , unzip it somewhere and
point
- Clone https://github.com/eilab-gt/plug-and-blend-tool into
- Additional information on Addons
Addons
are individual modules fulfilling functionalities for our exemplar instantiation.- For your convenience, we built a simple REST API framework that can load these moduels, located
at
CreativeWand.Addons
. - Check
Sample.py
for an example Addon.
In scripts
folder, run all scripts that start with start
:
start_addon_server.sh
starts addon server;start_experiments_server.sh
starts backend server;start_web_frontend_server.sh
starts the Web interface server.- Based on your system setup, you may need to
chmod +x [script name]
all scripts, or additionally deal withnode.js
dependencies.
Now you can access http://localhost:3000/?mode=mode_name&pid=test_session to start using the system.
- Available modes are
local
orglobal
but checkStartExperiment.py
for how to add more (Customize available communications, Experience Manager, Frontend, etc.) pid
will name the session, which then you can retrieve logs inlogs/
folder.- If you do not provide these URL parameters the start button won't work.
- If CreativeWand keeps saying it can't understand you
- This is a handle for internal errors. Check the console to see whether there are configuration (connection, setup) issues between all backend servers.
- If Webserver complains about compile errors
npm install
inweb-frontend/web-interface
(which should have been automatically done). There may be some per-machinenode.js
problem.
- If the Addon server gives error
- Double check whether you have your Addons set up correctly. Did you correctly set the paths to the models downloaded?
Feel free to open an issue if you get into any problems :) .