Skip to content

Latest commit

 

History

History
35 lines (28 loc) · 1.33 KB

README.md

File metadata and controls

35 lines (28 loc) · 1.33 KB

Prompts Generation:

You don't need to run the prompts generation codes as we already provide the generated prompts and can be downloaded from this link.

However, we provide also all the generation codes in this folder, where you can run it as follows:

Creativity skill:

We adopted LAION fast retrieval tool to retrieve training data (Nearest Neighbours) from LAION with text prompts.

python retrieve.py --file_path path/to/prompt --save_path path/to/prompt_with_img

And save the training data clip embedding with CLIP

model, preprocess = clip.load('ViT-B/32', device=device)
image = Image.open(image_path).convert('RGB')
inputs = preprocess(images=image, return_tensors="pt").to(device, torch.float16)
with torch.no_grad():
	gen_image_embd = model.encode_image(inputs).half()

Rest of skills:

Run our prompt generation file with the desired arguments:

1) Your openai.api_key
2) The desired num of generated prompts  # e.g., 1000
3) The desired skill  # e.g., "bias"

For instance:

python chatGPT_inference.py [your openai_api_key] 3000 "counting"