This is a super simple example of using a model via the Hugging Face Hub.
- A Hugging Face API key
- Node.js 18+
- npm or equivalent package manager
- Clone the repo
git clone <repo here>- Install the requirements
cd <repo here>
npm install- Create a
.envfile
touch .env- Add your Hugging Face API key to the
.envfile
HUGGING_FACE_API_KEY=<your api key here>
- Run the script
npm startYou can now play with the model by modifying the prompt constant in index.js.