Skip to content

Instantly share code, notes, and snippets.

@MattKovtun
Created July 18, 2018 10:18
Show Gist options
  • Save MattKovtun/f66d49a5320cbbc4224bcd761efa7dd9 to your computer and use it in GitHub Desktop.
Save MattKovtun/f66d49a5320cbbc4224bcd761efa7dd9 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>TF JS example</title>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/[email protected]"></script>
<link rel="stylesheet" href="../static/frontend/styles.css">
</head>
<body>
<h1 class="title">TensorflowJS client side prediction</h1>
<h2 class="title">When you first time press predict it will take more time, for model to load</h2>
<main class="file-form">
<input type="file" id="file" multiple class="file-form__select-file">
<label for="file" class="file-form__select-file_label">Choose files</label>
<button type="submit" class="file-form__button file-form__button_predict" id="predict">Predict</button>
<button type="submit" class="file-form__button file-form__button_clear" id="clear">Clear</button>
<span class="file-form__files" id="number-of-files"></span>
</main>
<div id="preview"></div>
<script src="../static/frontend/main.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment