Extremely lightweight and flexible ;)
const hug = require("./hug")
const { env } = require("process")
env.TOKEN = "MY_TOKEN_HERE" // From cookies
env.HFCHAT = "MY_HFCHAT_HERE" // From cookies
hug("Hello there")
.then(data => console.log(data))
> Hello! How can I assist you today?
Get your hf-chat
and token
value from cookies and your'e good to go.
First of all set the environment variables as below:
- Downlaod
hug_win.exe
file from the release page. - Get the
token
andhf-chat
from cookies panel and use them as follows.
set TOKEN=YOUR_TOKEN_HERE
set HFCHAT=YOUR_HFCHAT_HERE
- Downlaod
hug_linux
orhug_mac
file from the release page. - Get the
token
andhf-chat
from cookies panel and use them as follows.
export TOKEN="YOUR_TOKEN_HERE"
export HFCHAT="YOUR_HFCHAT_HERE"
Note: Unofficial and reverse engineered Huggingface API. This software cannot be used for any unlawful activities and commercial purpose.