Skip to content

Commit c12a320

Browse files
authored
Adding badges to the notebooks (#751)
* Adding new bagdes (community contributions, pricing warnings, preview features notices)
1 parent 5957eb7 commit c12a320

File tree

7 files changed

+228
-40
lines changed

7 files changed

+228
-40
lines changed

examples/Book_illustration.ipynb

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,28 @@
5959
"\n",
6060
"Each concept will be explained along the way, but if you need a simpler introduction to Imagen 3, check the [getting started](../quickstarts/Get_started_imagen.ipynb) notebook, or the [Imagen documentation](https://ai.google.dev/gemini-api/docs/imagen).\n",
6161
"\n",
62-
"Note: for the sake of the notebook's size (and your billing if you run it), the number of images has been limited to 3 characters and 3 chapters each time, but feel free to remove the limitation if you want more with your own experimentations.\n",
63-
"\n",
64-
"<font color='red'>Image generation is a paid-only feature and won't work if you are on the free tier. Check the [pricing](https://ai.google.dev/pricing#imagen-3) page for more details.</font>"
62+
"Note: for the sake of the notebook's size (and your billing if you run it), the number of images has been limited to 3 characters and 3 chapters each time, but feel free to remove the limitation if you want more with your own experimentations."
63+
]
64+
},
65+
{
66+
"cell_type": "markdown",
67+
"metadata": {
68+
"id": "xl0Hgj0rUv37"
69+
},
70+
"source": [
71+
"<!-- Princing warning Badge -->\n",
72+
"<table>\n",
73+
" <tr>\n",
74+
" <!-- Emoji -->\n",
75+
" <td bgcolor=\"#f5949e\">\n",
76+
" <font size=30>⚠️</font>\n",
77+
" </td>\n",
78+
" <!-- Text Content Cell -->\n",
79+
" <td bgcolor=\"#f5949e\">\n",
80+
" <h3><font color=black>Image generation is a paid-only feature and won't work if you are on the free tier. Check the <a href=\"https://ai.google.dev/pricing#imagen3\"><font color='#217bfe'>pricing</font></a> page for more details.</font></h3>\n",
81+
" </td>\n",
82+
" </tr>\n",
83+
"</table>"
6584
]
6685
},
6786
{

examples/Spatial_understanding_3d.ipynb

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,42 @@
4949
"<a target=\"_blank\" href=\"https://colab.research.google.com/github/google-gemini/cookbook/blob/main/examples/Spatial_understanding_3d.ipynb\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" height=30/></a>"
5050
]
5151
},
52+
{
53+
"cell_type": "markdown",
54+
"metadata": {
55+
"id": "ATkdRllgTFdo"
56+
},
57+
"source": [
58+
"This colab highlights some of the exciting use cases for Gemini 2.0 Flash in spatial understanding. It focuses on how [Gemini 2.0 Flash](https://ai.google.dev/gemini-api/docs/models/gemini-v2)'s image and real world understanding capabilities including pointing and 3D spatial understanding as briefly teased in the [Building with Gemini 2.0: Spatial understanding](https://www.youtube.com/watch?v=-XmoDzDMqj4) video."
59+
]
60+
},
61+
{
62+
"cell_type": "markdown",
63+
"metadata": {
64+
"id": "ToH2aAmNTIxv"
65+
},
66+
"source": [
67+
"<!-- Notice Badge -->\n",
68+
"<table align=\"left\" border=\"3\">\n",
69+
" <tr>\n",
70+
" <!-- Emoji -->\n",
71+
" <td bgcolor=\"#DCE2FF\">\n",
72+
" <font size=30>🚧</font>\n",
73+
" </td>\n",
74+
" <!-- Text Content Cell -->\n",
75+
" <td bgcolor=\"#DCE2FF\">\n",
76+
" <h3><font color=orange>Points and 3D bounding boxes are experimental. Use <a href=\"../quickstarts/Spatial_understanding.ipynb\"><font color='#217bfe'>2D bounding boxes</font></a> for higher accuracy.</font></h3>\n",
77+
" </td>\n",
78+
" </tr>\n",
79+
"</table>\n"
80+
]
81+
},
5282
{
5383
"cell_type": "markdown",
5484
"metadata": {
5585
"id": "dRicv4wSgGup"
5686
},
5787
"source": [
58-
"This colab highlights some of the exciting use cases for Gemini 2.0 Flash in spatial understanding. It focuses on how [Gemini 2.0 Flash](https://ai.google.dev/gemini-api/docs/models/gemini-v2)'s image and real world understanding capabilities including pointing and 3D spatial understanding as briefly teased in the [Building with Gemini 2.0: Spatial understanding](https://www.youtube.com/watch?v=-XmoDzDMqj4) video.\n",
59-
"\n",
60-
"<font color='orange' size=\"4\">**🚧 Points and 3D bounding boxes are experimental. Use [2D bounding boxes](../quickstarts/Spatial_understanding.ipynb) for higher accuracy.**</font>\n",
61-
"\n",
6288
"Pointing is an important capability for vision language models, because that allows the model to refer to an entity precisely. Gemini 2.0 Flash has improved accuracy on spatial understanding, with 2D point prediction as an experimental feature. Below you'll see that pointing can be combined with reasoning.\n",
6389
"\n",
6490
"<img src=\"https://storage.googleapis.com/generativeai-downloads/images/pointing.png\" />\n",

examples/Virtual_Try_On.ipynb

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,36 @@
4444
"\n",
4545
"This notebook is an implementation of virtually trying on different outfits by image editing and inpainting using Imagen 3, along with Gemini 2.5 for creating segmentation masks.\n",
4646
"\n",
47-
">**Note:** This notebook is designed to run on Google Colab. Certain commands, such as `%cd`, are specific to the Colab environment and may not work outside of it.\n",
48-
"\n",
49-
"\n",
50-
"#### Developed by [Nitin Tiwari](https://linkedin.com/in/tiwari-nitin)."
47+
">**Note:** This notebook is designed to run on Google Colab. Certain commands, such as `%cd`, are specific to the Colab environment and may not work outside of it."
48+
]
49+
},
50+
{
51+
"cell_type": "markdown",
52+
"metadata": {
53+
"id": "pxoGBmFYG_0Y"
54+
},
55+
"source": [
56+
"<!-- Community Contributor Badge -->\n",
57+
"<table>\n",
58+
" <tr>\n",
59+
" <!-- Author Avatar Cell -->\n",
60+
" <td bgcolor=\"#d7e6ff\">\n",
61+
" <a href=\"https://github.com/NSTiwari\" target=\"_blank\" title=\"View Nitin Tiwari's profile on GitHub\">\n",
62+
" <img src=\"https://github.com/NSTiwari.png?size=100\"\n",
63+
" alt=\"NSTiwari's GitHub avatar\"\n",
64+
" width=\"100\"\n",
65+
" height=\"100\">\n",
66+
" </a>\n",
67+
" </td>\n",
68+
" <!-- Text Content Cell -->\n",
69+
" <td bgcolor=\"#d7e6ff\">\n",
70+
" <h2><font color='black'>This notebook was contributed by <a href=\"https://github.com/NSTiwari\" target=\"_blank\"><font color='#217bfe'><strong>Nitin Tiwari</strong></font></a>.</font></h2>\n",
71+
" <h5><font color='black'><a href=\"https://linkedin.com/in/tiwari-nitin\"><font color=\"#078efb\">LinkedIn</font></a> - See <a href=\"https://github.com/NSTiwari\" target=\"_blank\"><font color=\"#078efb\"><strong>Nitin</strong></font></a> other notebooks <a href=\"https://github.com/search?q=repo%3Agoogle-gemini%2Fcookbook%20%22This%20notebook%20was%20contributed%20by%20Nitin%20Tiwari%22&type=code\" target=\"_blank\"><font color=\"#078efb\">here</font></a>.</h5></font><br>\n",
72+
" <!-- Footer -->\n",
73+
" <font color='black'><small><em>Have a cool Gemini example? Feel free to <a href=\"https://github.com/google-gemini/cookbook/blob/main/CONTRIBUTING.md\" target=\"_blank\"><font color=\"#078efb\">share it too</font></a>!</em></small></font>\n",
74+
" </td>\n",
75+
" </tr>\n",
76+
"</table>"
5177
]
5278
},
5379
{

quickstarts/Get_started_Veo.ipynb

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,36 @@
3939
"source": [
4040
"# Get started with Video generation using Veo\n",
4141
"\n",
42-
"<a target=\"_blank\" href=\"https://colab.research.google.com/github/google-gemini/cookbook/blob/main/quickstarts/Get_started_Veo.ipynb\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" height=30/></a>\n",
43-
"\n",
44-
"<font color='red'>Veo is a paid only feature. It won't run with the Free Tier. \n",
45-
"Running all examples in this notebook costs over **10$** (cf. [pricing](https://ai.google.dev/pricing#veo2) for more details).</font>"
42+
"<a target=\"_blank\" href=\"https://colab.research.google.com/github/google-gemini/cookbook/blob/main/quickstarts/Get_started_Veo.ipynb\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" height=30/></a>"
43+
]
44+
},
45+
{
46+
"cell_type": "markdown",
47+
"metadata": {
48+
"id": "ZxyWXUYxU4J-"
49+
},
50+
"source": [
51+
"<!-- Princing warning Badge -->\n",
52+
"<table>\n",
53+
" <tr>\n",
54+
" <!-- Emoji -->\n",
55+
" <td bgcolor=\"#f5949e\">\n",
56+
" <font size=30>⚠️</font>\n",
57+
" </td>\n",
58+
" <!-- Text Content Cell -->\n",
59+
" <td bgcolor=\"#f5949e\">\n",
60+
" <h3><font color=black>Veo is a paid only feature. It won't run with the Free Tier.<br> \n",
61+
"Running all examples in this notebook costs over <strong>10$</strong> (cf. <a href=\"https://ai.google.dev/pricing#veo2\"><font color='#217bfe'>pricing</font></a> for more details).</font></h3>\n",
62+
" </td>\n",
63+
" </tr>\n",
64+
"</table>"
4665
]
4766
},
4867
{
4968
"cell_type": "code",
5069
"execution_count": null,
5170
"metadata": {
71+
"cellView": "form",
5272
"id": "B0_quflsUfYj"
5373
},
5474
"outputs": [],

quickstarts/Get_started_imagen.ipynb

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
{
1313
"cell_type": "code",
14-
"execution_count": 1,
14+
"execution_count": null,
1515
"metadata": {
1616
"cellView": "form",
1717
"id": "fXysRA_X8mX9"
@@ -62,9 +62,28 @@
6262
"* Generate images in a wide range of formats and styles\n",
6363
"* Render text effectively\n",
6464
"\n",
65-
"This notebook is using the [Python SDK](https://googleapis.github.io/python-genai/#imagen). For the REST API, check out the [Get Started with Imagen](../Get_started_imagen_rest.ipynb) guide.\n",
66-
"\n",
67-
"<font color='red'>Image generation is a paid-only feature and won't work if you are on the free tier. Check the [pricing](https://ai.google.dev/pricing#imagen3) page for more details.</font>"
65+
"This notebook is using the [Python SDK](https://googleapis.github.io/python-genai/#imagen). For the REST API, check out the [Get Started with Imagen](../Get_started_imagen_rest.ipynb) guide.\n"
66+
]
67+
},
68+
{
69+
"cell_type": "markdown",
70+
"metadata": {
71+
"id": "shEdTt34HNvR"
72+
},
73+
"source": [
74+
"<!-- Warning Badge -->\n",
75+
"<table>\n",
76+
" <tr>\n",
77+
" <!-- Emoji -->\n",
78+
" <td bgcolor=\"#f5949e\">\n",
79+
" <font size=30>⚠️</font>\n",
80+
" </td>\n",
81+
" <!-- Text Content Cell -->\n",
82+
" <td bgcolor=\"#f5949e\">\n",
83+
" <h3><font color=black>Image generation is a paid-only feature and won't work if you are on the free tier. Check the <a href=\"https://ai.google.dev/pricing#imagen3\"><font color='#217bfe'>pricing</font></a> page for more details.</font></h3>\n",
84+
" </td>\n",
85+
" </tr>\n",
86+
"</table>"
6887
]
6988
},
7089
{
@@ -89,7 +108,7 @@
89108
},
90109
{
91110
"cell_type": "code",
92-
"execution_count": 2,
111+
"execution_count": null,
93112
"metadata": {
94113
"id": "46zEFO2a9FFd"
95114
},
@@ -120,7 +139,7 @@
120139
},
121140
{
122141
"cell_type": "code",
123-
"execution_count": 3,
142+
"execution_count": null,
124143
"metadata": {
125144
"id": "A1pkoyZb9Jm3"
126145
},
@@ -144,7 +163,7 @@
144163
},
145164
{
146165
"cell_type": "code",
147-
"execution_count": 4,
166+
"execution_count": null,
148167
"metadata": {
149168
"id": "HghvVpbU0Uap"
150169
},
@@ -177,7 +196,7 @@
177196
},
178197
{
179198
"cell_type": "code",
180-
"execution_count": 5,
199+
"execution_count": null,
181200
"metadata": {
182201
"id": "IJ8Vf9RVFeDi"
183202
},
@@ -209,7 +228,7 @@
209228
},
210229
{
211230
"cell_type": "code",
212-
"execution_count": 6,
231+
"execution_count": null,
213232
"metadata": {
214233
"id": "P4d8y2p_LBfK"
215234
},
@@ -232,7 +251,7 @@
232251
},
233252
{
234253
"cell_type": "code",
235-
"execution_count": 7,
254+
"execution_count": null,
236255
"metadata": {
237256
"id": "TM6oJ0YOLEFG"
238257
},
@@ -263,7 +282,7 @@
263282
},
264283
{
265284
"cell_type": "code",
266-
"execution_count": 8,
285+
"execution_count": null,
267286
"metadata": {
268287
"id": "jBtTVgLpMED3"
269288
},

quickstarts/Image_out.ipynb

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,27 @@
8787
"</table>"
8888
]
8989
},
90+
{
91+
"cell_type": "markdown",
92+
"metadata": {
93+
"id": "byls4vCqHHah"
94+
},
95+
"source": [
96+
"<!-- Notice Badge -->\n",
97+
"<table align=\"left\" border=\"3\">\n",
98+
" <tr>\n",
99+
" <!-- Emoji -->\n",
100+
" <td bgcolor=\"#DCE2FF\">\n",
101+
" <font size=30>🪧</font>\n",
102+
" </td>\n",
103+
" <!-- Text Content Cell -->\n",
104+
" <td bgcolor=\"#DCE2FF\">\n",
105+
" <h4><font color=black>Image-out is a preview feature. It is free to use for now with quota limitations, but is subject to change.</font></h4>\n",
106+
" </td>\n",
107+
" </tr>\n",
108+
"</table>"
109+
]
110+
},
90111
{
91112
"cell_type": "markdown",
92113
"metadata": {

0 commit comments

Comments
 (0)