python script not working

#32
by deeduckme - opened

from gradio_client import Client, handle_file

def predict_image_to_3d(image_url):
try:
client = Client("JeffreyXiang/TRELLIS")
result = client.predict(
image=handle_file(image_url),
multiimages=[],
seed=0,
ss_guidance_strength=7.5,
ss_sampling_steps=12,
slat_guidance_strength=3,
slat_sampling_steps=12,
multiimage_algo="stochastic",
api_name="/image_to_3d"
)
return result
except Exception as e:
print(f"Error occurred: {e}")
return None

image_url = 'https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png'
result = predict_image_to_3d(image_url)

if result:
print("Prediction successful:", result)
else:
print("Prediction failed. Please check inputs or the Gradio app.")

error : Loaded as API: https://jeffreyxiang-trellis.hf.space โœ”
Error occurred: The upstream Gradio app has raised an exception but has not enabled verbose error reporting. To enable, set show_error=True in launch().
Prediction failed. Please check inputs or the Gradio app.

it is working now no problem thanks

no it's not ! can you fix ?

Sign up or log in to comment