HumanAIGC / OutfitAnyone

Outfit Anyone: Ultra-high quality virtual try-on for Any Clothing and Any Person
5.56k stars 426 forks source link

API in huggingface space returns 403 code #20

Open furo-ops opened 9 months ago

furo-ops commented 9 months ago

The following code is specified to make requests to the model via API in the huggingface workspace. It isn't working, returns a the following output:

raise utils.InvalidAPIEndpointError()
gradio_client.utils.InvalidAPIEndpointError

This is the loaded code:

from gradio_client import Client

client = Client("https://humanaigc-outfitanyone.hf.space/--replicas/mms7m/")
result = client.predict(
        1,  # int (index of selected example) in 'parameter_12' Dataset component
                            api_name="/load_example_2"
)
print(result)

When using this other code it returns a 403 code:

from gradio_client import Client

client = Client("https://humanaigc-outfitanyone.hf.space/--replicas/mms7m/")
result = client.predict(
        https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png,   # filepath  in 'model' Image component
        https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png,   # filepath  in 'top garment' Image component
        https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png,   # filepath  in 'lower garment' Image component
                            api_name="/get_tryon_result"
)
print(result)

Is it still being stabilized?

Please let us know as soon as we can use it via API.

KR furo-ops

Ryandonofrio3 commented 9 months ago

Having the same issue. Tried to upload the images to Supabase. I think it's because we need to use true URLs for the models right now to prevent abuse but its not clear what those are!