Gen AI with ChatGPT.
Gen AI with ChatGPT shows how how to generate AI from description by using ChatGPT and Dall-E2.
You can generate movie, image by using ChatGPT, Stable Diffusion like Dall-E2 easily.
Example.
prompt=cat on moon surface in space, tabby cat
- run commands like below in terminal.
git clone https://github.com/mac999/gen_ai_gpt
cd gen_ai_gpt
pip install -r requirements.txt - create API key from OpenAI platform website
- open gen_ai_gpt.py and assign the API key to OPENAI_API_KEY at TODO source code line by using editor.
import sys, os, re, argparse, json
from yaml import parse
import openai
OPENAI_API_KEY = "" # TODO. ADD OPENAI API KEY
def gen_ai_prompt(query):
try:
# description in detail from query
openai.api_key = OPENAI_API_KEY
model = "gpt-3.5-turbo"
messages = [
...
python gen_ai_gpt.py --query="달의 위를 두발로 걷고 있는 우주복 입은 치즈태비 고양이를 묘사해줘." --style="realistic lighting, ultra-detailed, 8K, photorealism" --output="./image.png"