dkatz2391 commited on
Commit
07891e3
·
verified ·
1 Parent(s): 4751653

use gr.json

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -385,8 +385,8 @@ with gr.Blocks(delete_cache=(600, 600)) as demo:
385
  )
386
 
387
  # --- Add this section to explicitly register the API function for image to 3D ---
388
- # Revert to gr.State for the API input, as Node.js will now send a compatible structure (list of dicts)
389
- api_image_inputs_state = gr.State(value=[])
390
  api_input_type_state = gr.State(value="url")
391
  api_model_description_state = gr.State(value="ImagenModel")
392
 
@@ -398,7 +398,7 @@ with gr.Blocks(delete_cache=(600, 600)) as demo:
398
  api_image_gen_trigger_btn.click(
399
  generate_model_from_images_and_upload,
400
  inputs=[
401
- api_image_inputs_state, # <--- REVERTED to gr.State
402
  api_input_type_state,
403
  seed,
404
  ss_guidance_strength,
 
385
  )
386
 
387
  # --- Add this section to explicitly register the API function for image to 3D ---
388
+ # Use gr.JSON for the API input, as it's designed for arbitrary JSON data.
389
+ api_image_inputs_json = gr.JSON(value=[]) # <--- CHANGED to gr.JSON and new variable name
390
  api_input_type_state = gr.State(value="url")
391
  api_model_description_state = gr.State(value="ImagenModel")
392
 
 
398
  api_image_gen_trigger_btn.click(
399
  generate_model_from_images_and_upload,
400
  inputs=[
401
+ api_image_inputs_json, # <--- CHANGED to use the gr.JSON component's variable name
402
  api_input_type_state,
403
  seed,
404
  ss_guidance_strength,