mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
enable tensorflow prod
This commit is contained in:
parent
3438e3385c
commit
f31aa86542
@ -1,4 +1,5 @@
|
||||
const tf = require("@tensorflow/tfjs-node")
|
||||
|
||||
import * as nsfwjs from "nsfwjs/dist"
|
||||
import sharp from "sharp"
|
||||
|
||||
@ -17,6 +18,10 @@ const imageToInput = (image, numChannels) => {
|
||||
return input
|
||||
}
|
||||
|
||||
if (global.isProduction) {
|
||||
tf.enableProdMode()
|
||||
}
|
||||
|
||||
export default async (payload) => {
|
||||
let { url, image, channels = 3 } = payload
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user