May 2020
Intermediate to advanced
404 pages
10h 52m
English
To handle the '/' route in our application, we add the following lines of code to index.js, which merely renders a static file, index.html, which is placed in the public folder:
app.use(express.static('./public')).get('/', function (req, res) { res.sendFile('./index.html');});
Now, let's create the static index.html file by following these steps:
<html> <head> <title>TF.js Example - Iris Flower Classficiation</title> </head> <body> <h1> TF.js Example - Iris Flower Classification </h1> <hr> <p> First, train the model. Then, use the text boxes to try any dummy data. </p> <button id="train-btn">Train</button> ...
Read now
Unlock full access