Skip to content

docs: clarify details about installing the image-generation tool #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions docs/docs/100-tools/03-offerings/02-image-generation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ referencing the tool's link in your GPTScript. For now, you can follow the steps
git clone https://github.com/gptscript-ai/image-generation
```

2. Run `make bootstrap` to setup the python venv and install the required dependencies.
2. In the newly cloned repo, run `make bootstrap` to setup the python venv and install the required dependencies. Then activate the virtual environment.

```shell
make bootstrap
source .venv/bin/activate
```

3. Reference `<path-to-the-repo>/tool.gpt` in your GPTScript.
> Note: You can install the python dependencies manually by running `pip install -r requirements.txt` in the root of the cloned repository. This prevents the need to run `make bootstrap` or activate the virtual environment.

3. In the same shell session that your virutal environment is activated, reference `<path-to-the-repo>/tool.gpt` in your GPTScript.

## Usage
To use the Image Generation tool, you need to make sure that the OPENAI_API_KEY environment variable is set to your OpenAI API key. You can obtain an API key from the OpenAI platform if you don't already have one.
Expand Down
4 changes: 3 additions & 1 deletion examples/story-book/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ by `index.html` which has some JS/CSS to make the story styling consistent and r
cd image-generation
make bootstrap
source .venv/bin/activate
cd - # returns you back to your original directory
cd ../gptscript # returns you back to your original directory
```

> Note: You can install the python dependencies manually by running `pip install -r requirements.txt` in the root of the cloned repository. This prevents the need to run `make bootstrap` or activate the virtual environment.

2. **Run the `story-book.gpt` script.**

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:
Expand Down