|
3 | 3 | Story Book is a GPTScript that can generate a story based on a prompt and the number of pages you want the story to be in. It is generated in HTML format and can then be viewed
|
4 | 4 | by `index.html` which has some JS/CSS to make the story styling consistent and readable.
|
5 | 5 |
|
6 |
| -## How to Use |
7 |
| -1. Install the `image-generation` tool. |
| 6 | +## Usage Instructions |
8 | 7 |
|
9 |
| -```shell |
10 |
| -git clone https://github.com/gptscript-ai/image-generation |
11 |
| -``` |
| 8 | +1. **Clone the `image-generation` tool.** |
12 | 9 |
|
13 |
| -2. Bootstrap the `image-generation` tool. |
| 10 | + > Note: This example assumes `image-generation` is cloned as a sibling of your `gptscript` repo. We'll soon have package management that handles tools installation for you, but until then, you have to manually clone and boostrap tools. |
14 | 11 |
|
15 |
| -```shell |
16 |
| -( |
17 |
| - cd image-generation |
| 12 | + Navigate to the parent directory of your `gptscript` project, then clone the `image-generation` repository: |
| 13 | + |
| 14 | + ```shell |
| 15 | + git clone https://github.com/gptscript-ai/image-generation |
| 16 | + ``` |
| 17 | + |
| 18 | +2. **Install and bootstrap the `image-generation` tool.** |
| 19 | + |
| 20 | + Navigate to the `image-generation` directory, bootstrap the tool, activate the virtual environment, and then return to your original directory: |
| 21 | + |
| 22 | + ```shell |
| 23 | + cd ../image-generation |
18 | 24 | make bootstrap
|
19 | 25 | source .venv/bin/activate
|
20 |
| -) |
21 |
| -``` |
| 26 | + cd - # returns you back to your original directory |
| 27 | + ``` |
| 28 | + |
| 29 | +3. **Run the `story-book.gpt` script.** |
| 30 | + |
| 31 | + In the same terminal session where the virtual environment (venv) is now activated, navigate to the `story-book` example directory and run the `story-book.gpt` script: |
22 | 32 |
|
23 |
| -3. In the `story-book` directory of `gptscript`, run the `story-book.gpt` script. |
| 33 | + ```shell |
| 34 | + cd examples/story-book |
| 35 | + gptscript story-book.gpt --prompt "Goldilocks" --pages 3 |
| 36 | + ``` |
24 | 37 |
|
25 |
| -```shell |
26 |
| -cd examples/story-book |
27 |
| -gptscript examples/story-book/story-book.gpt --prompt "Goldilocks" --pages 3 |
28 |
| -``` |
| 38 | +4. **View the story.** |
29 | 39 |
|
30 |
| -4. Open `index.html` in your browser to view the story. |
| 40 | + Open `index.html` in your browser to view the generated story. |
0 commit comments