API inference is broken

#8
by babusinyoni - opened

When running the following script:

from gradio_client import Client
client = Client("https://one-2-3-45-one-2-3-45.hf.space/")
result = client.predict(
filepath_to_Estimated_elevation_JSON_file,
3,
False,
fn_index=30
)
print(result)

The following error is logged server-side:
FileNotFoundError: [Errno 2] No such file or directory: '.././demo_tmp/tmp_dir/pose.json'

As a result the API does not work on either the official demo or a private space

One-2-3-45 org

Thanks for your interest in our demo! Our space is public. The demo interface is designed for interactive GUI use, but not optimized for standalone API calls. The generation process comprises many subfunctions that need to share temporary intermediate data within the same session. When invoked separately via the API, these functions may not have matching session IDs, resulting in the FileNotFoundError you saw.

We have released our code on GitHub (https://github.com/One-2-3-45/One-2-3-45) for those interested in deployment. Please refer to the repo and feel free to open an issue if you have any other questions! We appreciate you taking the time to try out the API and understand the architecture.

Hi Chao Xu,
Is there a plan to look into this API issue in the near future? Being that Hugging Face is meant to democratise such technologies I would assume making them usable would be a priority.
A lot of HF users like myself do not have the material resources or technical knowhow to train and run a lot of SOTA models and it would be a shame if that access gap was consistently widened with each release.
Thank you for all your hard work in pushing the boundaries of 2D-to-3D translation, I've been following the field closely and One-2-3-45 was unimaginable as recently as a year ago.

One-2-3-45 org

We now support API calls. Please check the documentation on the App page for more details.

Sign up or log in to comment