https://github.com/jhrcook/openai-expt
Experimenting with the OpenAI model APIs.
https://github.com/jhrcook/openai-expt
ai artificial-intelligence dall-e examples image-generation openai
Last synced: about 2 months ago
JSON representation
Experimenting with the OpenAI model APIs.
- Host: GitHub
- URL: https://github.com/jhrcook/openai-expt
- Owner: jhrcook
- Created: 2022-11-04T22:49:30.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-11-10T22:52:46.000Z (over 2 years ago)
- Last Synced: 2025-01-13T11:50:10.278Z (3 months ago)
- Topics: ai, artificial-intelligence, dall-e, examples, image-generation, openai
- Language: Python
- Homepage:
- Size: 63.4 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Playing with OpenAI APIs
[](https://www.python.org)
[](https://github.com/psf/black)
[](https://github.com/pre-commit/pre-commit)
[](http://mypy-lang.org/)
[](http://www.pydocstyle.org/en/stable/)
[](https://www.gnu.org/licenses/gpl-3.0)## DALL-E
Generate images for example prompts.
```bash
❯ python dalle.py examples
Generating images for 'A man standing on a bridge in California.'
100%|█████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 6329.43it/s]
Generating images for 'A cat waving to her mom.'
100%|█████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 8671.89it/s]
Generating images for 'Elvis jumping out of a cake.'
100%|████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 10745.44it/s]
Generating images for 'Golden retriever riding the space shuttle to the moon.'
100%|█████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 9467.95it/s]
```(Note that DALL-E was specifically trained with some precautions against producing identifiable images of celebrities, e.g. Elvis.)
![]()
![]()
![]()
Or run with new prompts.
```bash
❯ ./dalle.py generate "a baby duck in a tea cup on a table" --n 3
Generating images for 'a baby duck in a tea cup on a table'
100%|███████████████████████████████████████████████████████████████████████████████████| 3/3 [00:20<00:00, 6.69s/it]
```
![]()
![]()
I played around with requesting different styles for the same prompt. The prompt was **"A computer programmer in the style of \."**
**Claude Monet**
![]()
![]()
**Vincent van Gogh**
![]()
![]()
**Jackson Pollock**
![]()
![]()
**"DALL-E" (itself)**
![]()
![]()