Spaces:
Running
on
Zero
python code not working
from gradio_client import Client, handle_file
Define the API endpoint and input file
client = Client("https://jeffreyxiang-trellis.hf.space")
file_path = "https://www.larousse.fr/encyclopedie/data/images/1002997-Lama.jpg"
try:
# Attempt to call the API
result = client.predict(
image=handle_file(file_path), # Input image file
multiimages=[], # Optional additional images
seed=0, # Random seed
ss_guidance_strength=7.5, # Guidance strength for single image
ss_sampling_steps=12, # Sampling steps for single image
slat_guidance_strength=3, # Guidance strength for slat
slat_sampling_steps=12, # Sampling steps for slat
multiimage_algo="stochastic", # Algorithm for multi-image processing
api_name="/image_to_3d" # API endpoint for the task
)
# Print the successful result
print("3D Asset Generation Result:", result)
except Exception as e:
# Log the error details
print("An error occurred during API interaction:")
print(e)
error :
nc@MacBookPro code-ressources % /usr/local/bin/python /Users/nc/code-ressources/scripts/3d/generate.py
Loaded as API: https://jeffreyxiang-trellis.hf.space/ โ
An error occurred during API interaction:
The upstream Gradio app has raised an exception but has not enabled verbose error reporting. To enable, set show_error=True in launch().