Skip to content

Commit c8706b4

Browse files
committed
New Gemini models for bbox tool
https://simonwillison.net/2025/Feb/5/gemini-2/ Plus fixed cropped image display to have a max width 100
1 parent ae89697 commit c8706b4

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

gemini-bbox.html

+7-6
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,6 @@
189189

190190
const img = document.createElement('img');
191191
img.src = dataURI;
192-
img.style.width = `${Math.round(width)}px`;
193-
img.style.height = `${Math.round(height)}px`;
194192
boundingBoxContainer.appendChild(img);
195193

196194
boundingBoxImages.appendChild(boundingBoxContainer);
@@ -292,11 +290,11 @@
292290
margin-top: 10px;
293291
}
294292
#boundingBoxImages {
295-
display: flex;
296-
flex-wrap: wrap;
297-
gap: 20px;
298293
margin-top: 20px;
299294
}
295+
#boundingBoxImages img {
296+
max-width: 100%;
297+
}
300298
.bounding-box-container {
301299
display: block;
302300
margin-bottom: 20px;
@@ -314,10 +312,13 @@
314312
<body>
315313
<h1>Gemini API Image Bounding Box Visualization</h1>
316314
<select id="modelSelect">
317-
<option value="gemini-2.0-flash-exp">gemini-2.0-flash-exp</option>
315+
<option value="gemini-2.0-flash">gemini-2.0-flash</option>
316+
<option value="gemini-2.0-flash-lite-preview-02-05">gemini-2.0-flash-lite-preview-02-05</option>
317+
<option value="gemini-2.0-pro-exp-02-05">gemini-2.0-pro-exp-02-05</option>
318318
<option value="gemini-1.5-pro-latest">gemini-1.5-pro</option>
319319
<option value="gemini-1.5-flash-latest">gemini-1.5-flash</option>
320320
<option value="gemini-1.5-flash-8b-latest">gemini-1.5-flash-8b</option>
321+
<option value="gemini-2.0-pro-exp-01-28">gemini-2.0-pro-exp-01-28</option>
321322
</select>
322323
<input type="file" id="imageInput" accept="image/*">
323324
<button id="clearImageBtn">Clear Image</button>

0 commit comments

Comments
 (0)