Downloads · 30 days
0
sdgsdggds/betty2
betty2 is a machine learning model from sdgsdggds. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
A Node.js API for creating queup.net bots, containerized with Docker for 24/7 operation on Hugging Face Spaces.
Downloads · 30 days
0
Access
Public
Updated Jun 5, 2025
Repo size
—
Likes
0
Public
Click a slice to open those files.
.js449 KB · 95%
From the Hugging Face model README
A Node.js API for creating queup.net bots, containerized with Docker for 24/7 operation on Hugging Face Spaces.
npm install dubapi
Optionally, the websocket implementation can make use of native addons for performance and spec compliance.
npm install --save-optional bufferutil utf-8-validate
var DubAPI = require('dubapi');
new DubAPI({username: '', password: ''}, function(err, bot) {
if (err) return console.error(err);
console.log('Running DubAPI v' + bot.version);
function connect() {bot.connect('friendship-is-magic');}
bot.on('connected', function(name) {
console.log('Connected to ' + name);
});
bot.on('disconnected', function(name) {
console.log('Disconnected from ' + name);
setTimeout(connect, 15000);
});
bot.on('error', function(err) {
console.error(err);
});
bot.on(bot.events.chatMessage, function(data) {
console.log(data.user.username + ': ' + data.message);
});
connect();
});
The bot is containerized using Docker for easy deployment and 24/7 operation on Hugging Face Spaces.
docker-compose up --build
docker-compose down
Configure these in your Hugging Face Space settings:
NODE_ENV: Set to "production"