Fraser commited on
Commit
b0969c4
·
1 Parent(s): 7b83f61
prototype_index.html CHANGED
@@ -267,7 +267,7 @@
267
  );
268
 
269
  const joyCaption = await Client.connect(
270
- "fancyfeast/joy-caption-alpha-two",
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
- input_image: workflowState.userImage,
307
- caption_type: "Descriptive",
308
- caption_length: "long",
309
- extra_options: [],
310
- name_input: "",
311
- custom_prompt: ""
312
- });
313
 
314
- const [prompt, caption] = output.data;
315
- // Store the detailed object description
 
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) {