@onepunya/hugging-face-loader

1.0.4 • Public • Published

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

Package Sidebar

Install

npm i @onepunya/hugging-face-loader

Weekly Downloads

4

Version

1.0.4

License

ISC

Unpacked Size

3.73 kB

Total Files

4

Last publish

Collaborators

  • onepunya