Fraser commited on
Commit
bfa24bd
·
1 Parent(s): df54477
CLAUDE.md CHANGED
@@ -85,7 +85,7 @@ const client = await window.gradioClient.Client.connect("space-name");
85
 
86
  **Current Gradio Connections:**
87
  - **Flux Image Generation**: `Fraser/flux`
88
- - **Joy Caption**: `fancyfeast/joy-caption-beta-one`
89
  - **Zephyr-7B Text Generation**: `Fraser/zephyr-7b`
90
 
91
  **Build Notes:**
 
85
 
86
  **Current Gradio Connections:**
87
  - **Flux Image Generation**: `Fraser/flux`
88
+ - **Joy Caption**: `fancyfeast/joy-caption-alpha-two`
89
  - **Zephyr-7B Text Generation**: `Fraser/zephyr-7b`
90
 
91
  **Build Notes:**
prototype_index.html CHANGED
@@ -267,7 +267,7 @@
267
  );
268
 
269
  const joyCaption = await Client.connect(
270
- "fancyfeast/joy-caption-beta-one",
271
  opts
272
  );
273
 
 
267
  );
268
 
269
  const joyCaption = await Client.connect(
270
+ "fancyfeast/joy-caption-alpha-two",
271
  opts
272
  );
273
 
src/App.svelte CHANGED
@@ -109,7 +109,7 @@
109
  );
110
 
111
  joyCaptionClient = await gradioClient.Client.connect(
112
- "fancyfeast/joy-caption-beta-one",
113
  opts
114
  );
115
 
 
109
  );
110
 
111
  joyCaptionClient = await gradioClient.Client.connect(
112
+ "fancyfeast/joy-caption-alpha-two",
113
  opts
114
  );
115
 
src/lib/components/PicletGenerator/PicletGenerator.svelte CHANGED
@@ -302,18 +302,18 @@ Focus on: colors, body shape, eyes, limbs, mouth, and key visual features. Omit
302
  }
303
 
304
  try {
305
- // Call Joy Caption Beta One with correct endpoint (no "/predict" - use default endpoint)
306
  const output = await joyCaptionClient.predict([
307
- workflowState.userImage, // input_image
308
- "Write a detailed description for this image.", // prompt_box
309
- 0.6, // temperature_slider
310
- 0.9, // top_p_slider
311
- 512, // max_tokens_slider
312
- false // log_prompt
313
  ]);
314
 
315
- // Joy Caption Beta One returns just the caption text
316
- const caption = output.data[0] || output.data;
317
  // Store the detailed object description
318
  workflowState.imageCaption = caption;
319
  console.log('Detailed object description generated:', caption);
 
302
  }
303
 
304
  try {
305
+ // Call Joy Caption Alpha Two with correct parameters
306
  const output = await joyCaptionClient.predict([
307
+ workflowState.userImage, // input_image
308
+ "Descriptive", // caption_type
309
+ "long", // caption_length
310
+ [], // extra_options
311
+ "", // name_input
312
+ "" // custom_prompt
313
  ]);
314
 
315
+ // Joy Caption Alpha Two returns (prompt_str, caption)
316
+ const [prompt_str, caption] = output.data;
317
  // Store the detailed object description
318
  workflowState.imageCaption = caption;
319
  console.log('Detailed object description generated:', caption);