Fraser commited on
Commit
8127b3b
·
1 Parent(s): b2ca2a7
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
- // Create blob URL directly from the File object
306
- const imageUrl = URL.createObjectURL(workflowState.userImage);
307
-
308
- // Call Joy Caption Alpha Two with correct parameters
309
- const output = await joyCaptionClient.predict([
310
- imageUrl, // input_image (as blob URL)
311
- "Descriptive", // caption_type
312
- "long", // caption_length
313
- [], // extra_options
314
- "", // name_input
315
- "" // custom_prompt
316
  ]);
317
 
318
- // Joy Caption Alpha Two returns (prompt_str, caption)
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;