Update index.js
Browse files
index.js
CHANGED
@@ -31,8 +31,6 @@ import { ApiKey } from './models.js';
|
|
31 |
import { Readable } from "stream";
|
32 |
import { randomBytes } from "crypto";
|
33 |
import { AkenoaiJs } from "akenoaijs";
|
34 |
-
import tf from '@tensorflow/tfjs-node';
|
35 |
-
import nsfwjs from 'nsfwjs';
|
36 |
|
37 |
import {
|
38 |
CheckMilWare,
|
@@ -47,7 +45,6 @@ import sharp from "sharp";
|
|
47 |
import bodyParser from 'body-parser';
|
48 |
import swaggerJsDoc from 'swagger-jsdoc';
|
49 |
import helmet from "helmet";
|
50 |
-
import { Buffer } from "buffer/index.js";
|
51 |
|
52 |
// routes
|
53 |
import { GempaRoutes } from './plugins/gempa.js';
|
@@ -134,16 +131,6 @@ const AllJsonReques = {
|
|
134 |
},
|
135 |
}
|
136 |
|
137 |
-
let model;
|
138 |
-
|
139 |
-
nsfwjs.load("https://raw.githubusercontent.com/infinitered/nsfwjs/master/models/inception_v3/model.json", { size: 299 })
|
140 |
-
.then((loadedModel) => {
|
141 |
-
model = loadedModel;
|
142 |
-
console.log('Model loaded');
|
143 |
-
})
|
144 |
-
.catch((error) => {
|
145 |
-
console.error('Error loading model:', error);
|
146 |
-
});
|
147 |
|
148 |
app.get("/api/v1/json/all", async (req, res) => {
|
149 |
res.json(AllJsonReques);
|
|
|
31 |
import { Readable } from "stream";
|
32 |
import { randomBytes } from "crypto";
|
33 |
import { AkenoaiJs } from "akenoaijs";
|
|
|
|
|
34 |
|
35 |
import {
|
36 |
CheckMilWare,
|
|
|
45 |
import bodyParser from 'body-parser';
|
46 |
import swaggerJsDoc from 'swagger-jsdoc';
|
47 |
import helmet from "helmet";
|
|
|
48 |
|
49 |
// routes
|
50 |
import { GempaRoutes } from './plugins/gempa.js';
|
|
|
131 |
},
|
132 |
}
|
133 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
|
135 |
app.get("/api/v1/json/all", async (req, res) => {
|
136 |
res.json(AllJsonReques);
|