Skip to content

Instantly share code, notes, and snippets.

@oscar-defelice
Created November 4, 2020 08:32
Show Gist options
  • Save oscar-defelice/ffcd49376ba0f12d7f6ace34ccbfdb49 to your computer and use it in GitHub Desktop.
Save oscar-defelice/ffcd49376ba0f12d7f6ace34ccbfdb49 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@latest"></script>
<meta charset="UTF-8">
<title>Text Classifier</title>
</head>
<body>
<h1>Text Classifier</h1>
<div>
<div>
<h3>Insert here the text of some news you want to classify</h3>
</div>
</div>
<input type="text" id="myText" placeholder="Insert text...">
<p> </p>
<button type="Predict" id="5" onclick="predict()" >Predict</button>
<div id="dummy">Once you are ready, click "Predict" to visualise the predicted class of your text.</div>
<p><br> </p>
<div id="prediction"></div>
</body>
<script src="model.js"></script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment