Opossum Search
Copyright 2025 Google LLC.
This notebook contains a simple example of generating code with the Gemini API and Gemini Flash. Just for fun, you'll prompt the model to create a web app called "Opossum Search" that searches Google with "opossum" appended to the query.
The opossum image above is from Wikimedia Commons, and shared under a CC BY-SA 2.5 license.
Set up your API key
To run the following cell, your API key must be stored it in a Colab Secret named GOOGLE_API_KEY. If you don't already have an API key, or you're not sure how to create a Colab Secret, see the Authentication
quickstart for an example.
Prompt the model to generate the web app.
Run the output locally
You can start a web server as follows.
- Save the HTML output to a file called
search.html - In your terminal run
python3 -m http.server 8000 - Open your web browser, and point it to
http://localhost:8000/search.html
Display the output in IPython
Like all LLMs, the output may not always be correct. You can experiment by rerunning the prompt, or by writing an improved one (and/or better system instructions). Have fun!