gen
Browse files
prototype_index.html
CHANGED
|
@@ -267,7 +267,7 @@
|
|
| 267 |
);
|
| 268 |
|
| 269 |
const joyCaption = await Client.connect(
|
| 270 |
-
"fancyfeast/joy-caption-
|
| 271 |
opts
|
| 272 |
);
|
| 273 |
|
|
|
|
| 267 |
);
|
| 268 |
|
| 269 |
const joyCaption = await Client.connect(
|
| 270 |
+
"fancyfeast/joy-caption-beta-one",
|
| 271 |
opts
|
| 272 |
);
|
| 273 |
|
src/lib/components/PicletGenerator/PicletGenerator.svelte
CHANGED
|
@@ -302,17 +302,18 @@ Focus on: colors, body shape, eyes, limbs, mouth, and key visual features. Omit
|
|
| 302 |
}
|
| 303 |
|
| 304 |
try {
|
| 305 |
-
const output = await joyCaptionClient.predict(
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
|
| 314 |
-
|
| 315 |
-
|
|
|
|
| 316 |
workflowState.imageCaption = caption;
|
| 317 |
console.log('Detailed object description generated:', caption);
|
| 318 |
} catch (error) {
|
|
|
|
| 302 |
}
|
| 303 |
|
| 304 |
try {
|
| 305 |
+
const output = await joyCaptionClient.predict(0, [
|
| 306 |
+
workflowState.userImage, // input_image
|
| 307 |
+
"Write a detailed description for this image.", // prompt
|
| 308 |
+
0.6, // temperature
|
| 309 |
+
0.9, // top_p
|
| 310 |
+
512, // max_new_tokens
|
| 311 |
+
false // log_prompt
|
| 312 |
+
]);
|
| 313 |
|
| 314 |
+
// Joy Caption Beta One returns just the caption text
|
| 315 |
+
const caption = output.data[0] || output.data;
|
| 316 |
+
// Store the detailed object description
|
| 317 |
workflowState.imageCaption = caption;
|
| 318 |
console.log('Detailed object description generated:', caption);
|
| 319 |
} catch (error) {
|