Create controllable story sequences with transformers that can be used in user-evaluation studies of text-to-visualisation pipelines.
GPT Storytale has been tested on python 3.10. You will need to install the required packages. Using a virtual environment is recommended. e.g.
python3 -m venv myvenv # set up the virtual env
source myvenv/bin/activate # activate the virtual env (Linux) (On Windows: myvenv\Scripts\activate)
pip install -r requirements.txt # install the required packagesYou will also need to set up your OpenAI API key. You can do this by creating a .env file in the root directory of the project and adding the following line:
OPENAI_API_KEY=your-api-key(see .env-template for an example)
To run the GPT Storytale system:
- Generate a story sequence:
python src/generate_story.py --input your_input.json --output output_folder- Evaluate the generated sequences:
python src/evaluate.py --story_path output_folderFor detailed examples and parameter options, see the examples directory.
GPT Storytale/
├── src/ # Source code
├── examples/ # Example inputs and outputs
├── tests/ # Test files
├── figs/ # Figures and diagrams
└── requirements.txt # Project dependencies
- Generate coherent story sequences using transformer models
- Controllable narrative parameters
- Support for multiple story genres and styles
- Evaluation metrics for generated sequences
- Easy integration with visualization pipelines
This project builds upon several open-source tools and libraries:
- OpenAI GPT - For text generation
- Transformers - Hugging Face's transformer models
- NumPy - For numerical computations
- Pandas - For data manipulation
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a new branch for your feature
- Submit a pull request with a clear description of your changes
This project is licensed under the MIT License - see the LICENSE file for details.
