Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@onepunya/hugging-face-loader

onepunya5ISC1.0.4

try running your hugging face model

ai, REST api, Api, apikey, Free, Text2image, Onesytex-Api, mr.one, hugging face

readme

npm i @onepunya/hugging-face-loader

const trained = require('@onepunya/hugging-face-loader');
// Take the hugging face model for example: https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-xl-base-1.0 in huggingface.co

trained("cute girl", "hugging face key", "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-xl-base-1.0")
  .then(data => console.log(data)) // result is arraybuffer you can use "fs". to save the image
  .catch(err => console.error(err));

  npm i fs

fs.writeFileSync(data, `/image.jpg`)

Kontak Pengembang Api

see available models and apikey at hugging face