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.ymlconda activate creative-wand
pip install -e .and you will haveCreativeWand.Frameworkavailable in your workspace.
- Create a conda environment using provided
conda_env.yaml:conda env create -f conda_env.ymlconda 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/PNBand rename the folderpnb2(Or changeendpoint.pyaccordingly) - Check
AddonConfig.pyand change paths accordingly- Download https://storage.googleapis.com/sfr-gedi-data/gedi_topic.zip , unzip it somewhere and
point
gedi_locationthere; - for
base_locationinput a desiredhuggingfacegpt2-compatible model (either a model name or a path to given model), or usegptjfollowing the config sample. - We used
gptjfor 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
Addonsare 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.pyfor an example Addon.
In scripts folder, run all scripts that start with start:
start_addon_server.shstarts addon server;start_experiments_server.shstarts backend server;start_web_frontend_server.shstarts the Web interface server.- Based on your system setup, you may need to
chmod +x [script name]all scripts, or additionally deal withnode.jsdependencies.
Now you can access http://localhost:3000/?mode=mode_name&pid=test_session to start using the system.
- Available modes are
localorglobalbut checkStartExperiment.pyfor how to add more (Customize available communications, Experience Manager, Frontend, etc.) pidwill 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 installinweb-frontend/web-interface(which should have been automatically done). There may be some per-machinenode.jsproblem.
- 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 :) .