if (FALSE) {
# Generate an image from text
prompt <- "Create a picture of a nano banana dish in a fancy restaurant with a Gemini theme"
nano_banana(prompt, output_path = "gemini-native-image.png")
# Edit an image with a prompt (continued from generate)
prompt <- paste(
"Create a picture of my cat eating a nano-banana",
"in a restaurant under the Gemini constellation"
)
nano_banana(
prompt,
type = "edit",
img_path = "gemini-native-image.png",
output_path = "edited_image.png"
)
# Transfer style/content between two images
prompt <- paste(
"Take the blue floral dress from the first image",
"and let the woman from the second image wear it."
)
nano_banana(
prompt,
type = "transfer",
img_path = "dress.png",
img_path2 = "model.png",
output_path = "transferred_image.png"
)
}
Run the code above in your browser using DataLab