Tina Tarighian
commited on
Commit
·
103fcd2
1
Parent(s):
d82c8c7
work breaks + fun
Browse files- components/HandDetector.js +1 -1
- pages/api/gemini.js +1 -1
components/HandDetector.js
CHANGED
@@ -18,7 +18,7 @@ const HandDetector = () => {
|
|
18 |
|
19 |
// Prompt state
|
20 |
const [customPrompt, setCustomPrompt] = useState(
|
21 |
-
"Look at this image and identify the main object or scene (ignoring any hands or fingers that might be visible). Generate a single, short, insightful thought (maximum 5 words) about this object or scene. Focus on something interesting,
|
22 |
);
|
23 |
|
24 |
// Custom hooks
|
|
|
18 |
|
19 |
// Prompt state
|
20 |
const [customPrompt, setCustomPrompt] = useState(
|
21 |
+
"Look at this image and identify the main object or scene (ignoring any hands or fingers that might be visible). Generate a single, short, insightful thought (maximum 5 words) about this object or scene. Focus on something interesting, fun, or unexpected about it. DO NOT mention hands, fingers, pose estimation, motion tracking, or any computer vision technology in your response. Respond with just the thought, no additional text."
|
22 |
);
|
23 |
|
24 |
// Custom hooks
|
pages/api/gemini.js
CHANGED
@@ -31,7 +31,7 @@ export default async function handler(req, res) {
|
|
31 |
const model = genAI.getGenerativeModel({ model: "gemini-2.0-flash" });
|
32 |
|
33 |
// Use the custom prompt if provided, otherwise use the default
|
34 |
-
const promptText = prompt || "Look at this image and identify the main object or scene (ignoring any hands or fingers that might be visible). Generate a single, short, insightful thought (maximum 5 words) about this object or scene. Focus on something interesting,
|
35 |
|
36 |
// Prepare the image part for the model
|
37 |
const imagePart = {
|
|
|
31 |
const model = genAI.getGenerativeModel({ model: "gemini-2.0-flash" });
|
32 |
|
33 |
// Use the custom prompt if provided, otherwise use the default
|
34 |
+
const promptText = prompt || "Look at this image and identify the main object or scene (ignoring any hands or fingers that might be visible). Generate a single, short, insightful thought (maximum 5 words) about this object or scene. Focus on something interesting, fun, or unexpected about it. DO NOT mention hands, fingers, pose estimation, motion tracking, or any computer vision technology in your response. Respond with just the thought, no additional text.";
|
35 |
|
36 |
// Prepare the image part for the model
|
37 |
const imagePart = {
|