Automated Travel Guide Writer
This program uses OpenAI's GPT-3.5 and DALL-E to generate an entire travel guide book for each town listed in the towns.csv
file. Each town's travel guide will have a preset list of chapters that GPT-3.5 will use to write the entire chapter. After all chapters are finished, they will be combined into a .docx
file and DALL-E will provide images for each chapter.
Clone this repository
git clone https://github.com/nitebyte/TripTeller.git
Install the required modules:
openai
ebooklib
docx
requests
json
Get an OpenAI API key here.
Replace the api_key
in the PR
function and the headers
dictionary with your OpenAI API key. Lines 18, 19, and 95.
Run the program with the command:
python TripTeller.py
Your completed travel guide book(s) will be saved as a .docx
file in the same directory.
towns.csv
file contains a list of towns in the format Town,State
..txt
file that contains the generated text for its travel guide..docx
file in the same directory.book
variable in the TripTeller.py
file.token
parameter in the PR
functions.data
dictionary in the txt_to_docx
function.