#There is a bug!!!!

1 messages · Page 1 of 1 (latest)

eager sonnet
#

GatGBT no work, has bug, how to fix??!????

export default class HFCaption {
    public static async captionImage(image: Buffer): Promise<string> {
        try {
            const inference = new HfInference(config.huggingface.token);

            const data = await inference.imageToText({
                data: image,
                model: 'Salesforce/blip-image-captioning-base',
            });

            return data.generated_text
        } catch (err) {
            console.log(err);
            return null;
        }
    }
}
hexed yokeBOT
#

Hi @eager sonnet. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

I'm sorry, but the code you've provided doesn't seem to be related to OpenAI's products or services. It appears to be using the Hugging Face Inference API, which is a different service.

As an AI developed by OpenAI, I'm specifically trained to assist with questions related to OpenAI's products and services. For issues with Hugging Face's API, I would recommend checking their official documentation or reaching out to their support for assistance.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@eager sonnet kapa.ai is still learning and improving, please let us know how it did by reacting below

eager sonnet
#

nice, it also knows how to reply to clueless users ShibeLaugh