Monikashyapa commited on
Commit
c513d19
·
verified ·
1 Parent(s): 5a0469a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -37,8 +37,6 @@ def tryon_local(person_img, garment_img, seed, randomize_seed):
37
  # Hunyuan3D API client
38
  # -----------------------------
39
  hunyuan_client = Client("tencent/Hunyuan3D-2.1")
40
-
41
- # Pick the first available endpoint
42
  fn_index_default = hunyuan_client.endpoints[0].fn_index if hunyuan_client.endpoints else 0
43
 
44
  def tryon_to_3d(person_img, garment_img, seed, randomize_seed):
@@ -47,10 +45,10 @@ def tryon_to_3d(person_img, garment_img, seed, randomize_seed):
47
  return None, "Try-on failed"
48
 
49
  try:
50
- # Send images to Hunyuan3D API
51
  result_3d = hunyuan_client.predict(
52
- person_img=tryon_img,
53
- garment_img=garment_img,
54
  fn_index=fn_index_default
55
  )
56
  return result_3d, tryon_info
 
37
  # Hunyuan3D API client
38
  # -----------------------------
39
  hunyuan_client = Client("tencent/Hunyuan3D-2.1")
 
 
40
  fn_index_default = hunyuan_client.endpoints[0].fn_index if hunyuan_client.endpoints else 0
41
 
42
  def tryon_to_3d(person_img, garment_img, seed, randomize_seed):
 
45
  return None, "Try-on failed"
46
 
47
  try:
48
+ # Positional arguments only; no keyword args
49
  result_3d = hunyuan_client.predict(
50
+ tryon_img, # first argument
51
+ garment_img, # second argument
52
  fn_index=fn_index_default
53
  )
54
  return result_3d, tryon_info