You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
-
by `index.html` which has some JS/CSS to make the story styling consistent and readable.
3
+
Story Book is a web application that has an interface for users to input a prompt and number of pages. This information then generates a story based on the prompt. All generation is done using GPTScript on the backend.
5
4
6
5
## Usage Instructions
7
6
8
-
1.**Run the `story-book.gpt` script.**
7
+
1.Make sure you have at least Node v20.11.1 installed. If you don't, you can install it [here](https://nodejs.org/en/download).
9
8
10
-
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:
9
+
2. Navigate to the `examples/story-book` directory.
3. Start the Nuxt application by running the following commands:
18
16
19
-
Open `index.html`in your browser to view the generated story.
17
+
```bash
18
+
npm i
19
+
npm run dev
20
+
```
20
21
21
-
3. (optional) **Generate a new story.**
22
-
23
-
To generate another story, you'll first need to delete the existing `pages` directory. In the `examples/story-book` directory, run the following command:
24
-
25
-
```shell
26
-
rm -rf pages
27
-
```
28
-
29
-
After that, you can generate a new story by running the `story-book.gpt` script again with a different prompt or number of pages.
30
-
31
-
```shell
32
-
gptscript story-book.gpt --prompt "The Three Little Pigs" --pages 5
33
-
```
22
+
4. Navigate to `http://localhost:3000` in your browser.
<UTextarea:ui="{base: 'h-[20vh]'}"size="xl"class=""v-model="state.prompt"label="Prompt"placeholder="Put your full story here or prompt for a new one"/>
0 commit comments