Skip to content

Instantly share code, notes, and snippets.

@josete89
Created May 25, 2018 08:26
Show Gist options
  • Save josete89/c56fdacbb7857c93aafb5e9f9837e957 to your computer and use it in GitHub Desktop.
Save josete89/c56fdacbb7857c93aafb5e9f9837e957 to your computer and use it in GitHub Desktop.
import * as tf from '@tensorflow/tfjs'
const app = requiere('express')()
import '@tensorflow/tfjs-node'
tf.setBackend('tensorflow')
app.get('/model',(req,res) => {
const prediction = await model.predict(req['x']).data()
res.send(prediction)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment