revert
Browse files
src/lib/components/PicletGenerator/PicletGenerator.svelte
CHANGED
|
@@ -302,24 +302,16 @@ Focus on: colors, body shape, eyes, limbs, mouth, and key visual features. Omit
|
|
| 302 |
}
|
| 303 |
|
| 304 |
try {
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
"
|
| 312 |
-
"long", // caption_length
|
| 313 |
-
[], // extra_options
|
| 314 |
-
"", // name_input
|
| 315 |
-
"" // custom_prompt
|
| 316 |
]);
|
| 317 |
|
| 318 |
-
|
| 319 |
-
const [prompt_str, caption] = output.data;
|
| 320 |
-
|
| 321 |
-
// Cleanup blob URL
|
| 322 |
-
URL.revokeObjectURL(imageUrl);
|
| 323 |
|
| 324 |
// Store the detailed object description
|
| 325 |
workflowState.imageCaption = caption;
|
|
|
|
| 302 |
}
|
| 303 |
|
| 304 |
try {
|
| 305 |
+
const output = await joyCaptionClient.predict("/stream_chat", [
|
| 306 |
+
workflowState.userImage, // input_image
|
| 307 |
+
"Descriptive", // caption_type
|
| 308 |
+
"long", // caption_length
|
| 309 |
+
[], // extra_options
|
| 310 |
+
"", // name_input
|
| 311 |
+
"" // custom_prompt (empty for default descriptive captioning)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 312 |
]);
|
| 313 |
|
| 314 |
+
const [, caption] = output.data;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 315 |
|
| 316 |
// Store the detailed object description
|
| 317 |
workflowState.imageCaption = caption;
|