{"id":18689723,"url":"https://github.com/mrseanryan/gpt-images","last_synced_at":"2025-11-08T07:30:30.907Z","repository":{"id":186688004,"uuid":"675565707","full_name":"mrseanryan/gpt-images","owner":"mrseanryan","description":"Simple Python client to generate images from a word-list via Open AI (DAL-E)","archived":false,"fork":false,"pushed_at":"2025-01-20T19:36:16.000Z","size":44,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-20T20:32:03.628Z","etag":null,"topics":["genai","image-generation","image-generation-ai","image-generator-using-openai-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrseanryan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-07T08:08:16.000Z","updated_at":"2025-01-20T19:36:19.000Z","dependencies_parsed_at":"2024-11-07T10:45:22.595Z","dependency_job_id":"f7cb4bdb-ce70-4ea4-a4b5-571406a7f8bf","html_url":"https://github.com/mrseanryan/gpt-images","commit_stats":null,"previous_names":["mrseanryan/gpt-images"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrseanryan%2Fgpt-images","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrseanryan%2Fgpt-images/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrseanryan%2Fgpt-images/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrseanryan%2Fgpt-images/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrseanryan","download_url":"https://codeload.github.com/mrseanryan/gpt-images/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239550286,"owners_count":19657541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["genai","image-generation","image-generation-ai","image-generator-using-openai-api"],"created_at":"2024-11-07T10:44:58.071Z","updated_at":"2025-11-08T07:30:30.861Z","avatar_url":"https://github.com/mrseanryan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gpt-images\n\nSimple Python client to generate images from a word-list via Open AI (DAL-E)\n\n## Dependencies\n\n- Open-AI API key (for DAL-E)\n- Python 3\n- Unix or Mac OS (Windows may need some adaptation)\n\n## Usage\n\n1. Set up (see the Setup section)\n2. Adjust [config.py](./config.py) to suit.\n3. Edit the list of words at [./data/words_no_image.json](./data/words_no_image.json).\n4. For **more abstract or complex words, the AI will need your help** to generate better images.\n\nThe **LLM's that generate the images have a limited vocabulary**, so words such as\n'zabuton' or 'wadi' are not (currently) correctly recognised. Also some words are so abstract, even for a human it is difficult to depict as an image (consider 'depression' or 'friendship' or 'shibboleth').\nAlso, some words can trigger the safety features of the LLM, for example 'trauma' or 'gruesome'.\nFor such words, you can add a description to describe the image you would like to see, that represents the word, in the 'complex_words' section of the JSON file.\n\nTo set up the JSON structure, you can run `./add_complex_word_templates.sh`.\n\nSee the example at [./data/example.words_no_image.json](./data/example.words_no_image.json).\n\n5. Run ./go.sh\n\nOR:\n\n```\npython ./generate_images_from_words.py \u003cpath to JSON file\u003e \u003cpath to output directory\u003e\n```\n\n6. Check the images at the output directory. By default this is [./output](./output).\n\n- to retry: delete any images you do not like, and then run again.\n- consider switching up to a better model (see [config.py](./config.py))\n\n## Set up\n\n0. Install Python and poetry\n\n- Python 3.11\n- [Poetry](https://python-poetry.org/docs/)\n\n1. Install openai Python client.\n\n```\npoetry install\n```\n\n2. Get an Open AI key\n\n3. Set environment variable with your OpenAI key:\n\n```\nexport OPENAI_API_KEY=\"xxx\"\n```\n\nAdd that to your shell initializing script (`~/.zprofile` or similar)\n\nLoad in current terminal:\n\n```\nsource ~/.zprofile\n```\n\nSetup is done.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrseanryan%2Fgpt-images","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrseanryan%2Fgpt-images","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrseanryan%2Fgpt-images/lists"}