Spaces:
Running
on
Zero
Unable to use the API
Hi,
Great model, I'm trying to use the model via API but unable to generate following the instructions. Any help on the same?
Me too, the API is giving answer as "None"
Me too, my issue is with heartbeat GET requests the API seems to be making.
Can you please share the code you tried to run? The js client package is still being worked on. Sorry about that!
const tryOn = async() => {
const model_response = await fetch("/Test_Model.png");
const model_image = await model_response.blob();
const item_response = await fetch("/Test_Top.png");
const item_image = await item_response.blob();
const app = await client("yisol/IDM-VTON", {}); //may need a href token??
const app_info = await app.view_api();
const result = await app.predict("/tryon", [
{"background":model_image,"layers":[],"composite":null}, // undefined in 'Human. Mask with pen or use auto-masking' Imageeditor component
item_image, // blob in 'Garment' Image component
"pants", // string in 'parameter_15' Textbox component
true, // boolean in 'Yes' Checkbox component
true, // boolean in 'Yes' Checkbox component
30, // number in 'Denoising Steps' Number component
42, // number in 'Seed' Number component
]) as GradioResult;
output_image = result.data[0];
masked_image = result.data[1];
};
Here you go! After looking through the developer tools, the error occurs in this line const app = await client("yisol/IDM-VTON", {});
It tries a GET heartbeat request and that rejects. It tries to go to this link
https://yisol-idm-vton.hf.space/heartbeat which is not found.
Can you help?
client = Client("yisol/IDM-VTON", hf_token=TOKEN)
result = client.predict(
dict={"background":file('https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png'),"layers":[], "composite": None},
garm_img=file('https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png'),
garment_des="Hello!!",
# is_checked=True,
# is_checked_crop=False,
# denoise_steps=30,
# seed=42,
api_name="/tryon"
)
print(result)
Return error raise ValueError(result["error"]) ValueError: None
Same here.
Same issue
Hello, where is the documentation to configure the api?