Code
<html>
<head>
<!-- TensorFlow.js version 0.11.2 -->
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@0.11.2"> </script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.bundle.min.js"> </script>
</head>
<body> <h3>Input your data and let TensorFlow give a best-fit line predict</h3>
x: <input type="text" id="x" />
y: <input type="text" id="y" />
<input type="button" id="append" value="submit">
<div style="padding:50px">
<canvas id="graph" width="80%" height="50%"></canvas>
</div>Last updated