From the course: Building AI-Powered Android Apps with Gemini
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
Include multiple images in Gemini prompts
From the course: Building AI-Powered Android Apps with Gemini
Include multiple images in Gemini prompts
- [Instructor] Gemini's multimodal capabilities go beyond just analyzing single images. You can also compare images to each other. To demonstrate this, I've made a new version of this application and I'll describe the changes. First of all, the Drawable resources directory now has two images, one named Bird and the other named Cats. In my application's baking screen class, I've eliminated code that was being used to select an image and draw a border around it. I no longer need that because I'm going to be sending both of these images to the Gemini model. I've also made some changes in the strings file. Notice that I have an image one description and an image two description, bird and cats. And when I call the baking view model in the send prompt function, I'm now passing in two bitmaps. It's up to the user to provide the prompt, but I've set the default prompt to the string, what is the difference between these photos? I'll click the go button and let's see what comes back from…