HumanAIGC / OutfitAnyone

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

Gradio API not working #23

Open Filocava99 opened 6 months ago

Filocava99 commented 6 months ago

The javascript API endpoint for generating a try on doesn't work, it always returns error, even when using the example code:

import { client } from "@gradio/client";

const response_0 = await fetch("https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png");
const exampleImage = await response_0.blob();

const response_1 = await fetch("https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png");
const exampleImage = await response_1.blob();

const response_2 = await fetch("https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png");
const exampleImage = await response_2.blob();

const app = await client("https://humanaigc-outfitanyone.hf.space/--replicas/mms7m/");
const result = await app.predict("/get_tryon_result", [
                exampleImage,   // blob in 'model' Image component
                exampleImage,   // blob in 'top garment' Image component
                exampleImage,   // blob in 'lower garment' Image component
    ]);

console.log(result.data);
G-force78 commented 6 months ago

The model has been locked behind an API