remove autotagger
This commit is contained in:
parent
dc14d2f78f
commit
77a703a5f0
|
@ -162,6 +162,7 @@ export default new class {
|
||||||
return tags;
|
return tags;
|
||||||
};
|
};
|
||||||
async detectNSFW(dest) {
|
async detectNSFW(dest) {
|
||||||
|
return false;
|
||||||
const { stdout, stderr } = await exec(
|
const { stdout, stderr } = await exec(
|
||||||
`python -c "import sys\nfrom nsfw_detector import predict\nmodel = predict.load_model('./nsfw_model.h5')\nprint(predict.classify(model, './public/b/${dest}'))"`
|
`python -c "import sys\nfrom nsfw_detector import predict\nmodel = predict.load_model('./nsfw_model.h5')\nprint(predict.classify(model, './public/b/${dest}'))"`
|
||||||
);
|
);
|
||||||
|
|
|
@ -191,7 +191,7 @@ export default async bot => {
|
||||||
speed = !Number.isFinite(speed) ? "yes" : `${speed.toFixed(2)} Mbit/s`;
|
speed = !Number.isFinite(speed) ? "yes" : `${speed.toFixed(2)} Mbit/s`;
|
||||||
|
|
||||||
// autotagger
|
// autotagger
|
||||||
let tags = [];
|
/*let tags = [];
|
||||||
let score = 0;
|
let score = 0;
|
||||||
try {
|
try {
|
||||||
if(mime.startsWith('image')) {
|
if(mime.startsWith('image')) {
|
||||||
|
@ -240,10 +240,13 @@ export default async bot => {
|
||||||
}
|
}
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
e.reply([
|
/*e.reply([
|
||||||
`[f0cked] link: ${cfg.main.url.full}/${itemid} | size: ${lib.formatSize(size)} | speed: ${speed}` + (tags.length > 0 ? ` | tags: ${tags.join(', ')} (score: ${score.toFixed(2)})` : '')
|
`[f0cked] link: ${cfg.main.url.full}/${itemid} | size: ${lib.formatSize(size)} | speed: ${speed}` + (tags.length > 0 ? ` | tags: ${tags.join(', ')} (score: ${score.toFixed(2)})` : '')
|
||||||
|
]);*/
|
||||||
|
e.reply([
|
||||||
|
`[f0cked] link: ${cfg.main.url.full}/${itemid} | size: ${lib.formatSize(size)} | speed: ${speed}`
|
||||||
]);
|
]);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user