Khrisna commited on
Commit
1f10f3f
·
1 Parent(s): bcaeb16

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +2 -1
index.js CHANGED
@@ -16,6 +16,7 @@ const app = express()
16
  app.set('json spaces', 4)
17
  app.use(morgan('dev'))
18
  app.use(express.json())
 
19
 
20
  app.all('/', (req, res) => {
21
  const status = {}
@@ -340,7 +341,7 @@ async function waifu2x(image, formats) {
340
  return images.data
341
  }
342
  async function check_nsfw(buffer) {
343
- let _model = load_model()
344
  const convert = async (img) => {
345
  // Decoded image in UInt8 Byte array
346
  const image = await jpegjs.decode(img, { useTArray: true })
 
16
  app.set('json spaces', 4)
17
  app.use(morgan('dev'))
18
  app.use(express.json())
19
+ app.use(express.urlencoded({ limit: '10mb', extended: true }))
20
 
21
  app.all('/', (req, res) => {
22
  const status = {}
 
341
  return images.data
342
  }
343
  async function check_nsfw(buffer) {
344
+ let _model = await load_model()
345
  const convert = async (img) => {
346
  // Decoded image in UInt8 Byte array
347
  const image = await jpegjs.decode(img, { useTArray: true })