Skip to content

Instantly share code, notes, and snippets.

@maxoobot

maxoobot/index.html

Last active Mar 23, 2020
Embed
What would you like to do?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MNIST Flask app</title>
</head>
<body>
<h1>MNIST image classifier</h1>
<form id="upload-form" action="{{ url_for('upload_and_predict') }}" method="POST" enctype="multipart/form-data">
<input type="file" name="file" accept="image/*">
<input type="hidden" name="uploaded" value="True">
<input type="submit" value="Predict">
</form>
<br>
{% if uploaded %}
<span style="font-size:18px">Prediction Result: {{ prediction }}</span>
<br><br>
<img src="{{ imgpath }}" width="320">
{% else %}
<span style="font-size:18px">Prediction Result: --upload a picture!--</span>
{% endif %}
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.