Skip to content

Commit

Permalink
the prompt never worked 😭💀
Browse files Browse the repository at this point in the history
  • Loading branch information
Chiroyce1 committed Dec 30, 2023
1 parent 7071022 commit 61c5568
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
<div class="stuff">
<h1>Gemini Pro Vision</h1>
<div class="flex">
<div class="left">
<video id="webcam" autoplay></video>
</div>
<div class="right">
<select id="cameraSelect"></select><br>
<input type="password" id="api" placeholder="Enter API key (get it from ai.google.dev)">
<textarea id="prompt" placeholder="Enter prompt here" rows="4" cols="40"></textarea><br>
<button>Analyze Image</button>
</div>
<div class="left">
<video id="webcam" autoplay></video>
</div>
</div>
<br>
<canvas id="canvas" width="640" height="480" style="display: none;"></canvas>
Expand Down
2 changes: 1 addition & 1 deletion script.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ async function captureImage() {
let res;
active = true;
try {
res = await model.generateContentStream([prompt, image]);
res = await model.generateContentStream([promptInput.value, image]);
let text = "";
for await (const chunk of res.stream) {
text += chunk.text();
Expand Down

0 comments on commit 61c5568

Please sign in to comment.