FairyTailor: Multimodal Generative Framework for Storytelling
Users can create a cohesive children’s story by weaving generated texts and retrieved images with their input.
With co-creation, writers contribute their creative thinking, while generative models contribute to their constant workflow.
FairyTailor adds another modality and modifies the text generation process to help producing a coherent and creative story.
Notice (Updated September 17, 2023):
The live demo and dvc downloads are no longer available.
After cloning the repository:
Install and check that the client compiles:
cd client
npm i
npm run build
Install and activate the environment (conda provided):
conda env create -f environment.yml
conda activate MultiModalStory
Install environment globally in the directory:
pip install -e .
pip install git+https://github.com/openai/CLIP.git
After installation run:
python -m spacy download en_core_web_sm
In python terminal:
nltk.download('wordnet')
nltk.download('sentiwordnet')
nltk.download('averaged_perceptron_tagger')
Our large data files are stored on IBM’s Cloud Object Storage, and to pull data files from that platform you will use a special, read-only .dvc/config
file.
dvc pull -f
Which will pull:
Client:
cd client
npm run devw
Backend (with server auto reload):
uvicorn backend.server:app --reload --reload-dir backend
Open the uvicorn server localhost:8000
in your web browser
backend/story_generator/downloaded directory
.FINETUNED_GPT2_PATH
in backend/story_generator/constants.py
.client/public/unsplash25k/sketch_images1024
with yours.IMAGE_PATH
in client/src/components/Constants.js
.backend/server/main.py
.client/src/js/api/mainApi.js
to call the backend endpoint from the client.client/src/components
.