Spaces:
Running
Running
Update app.py
Browse files
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 |
-
#
|
| 51 |
result_3d = hunyuan_client.predict(
|
| 52 |
-
|
| 53 |
-
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
|