Last active
March 23, 2020 06:23
-
-
Save maxoobot/2f1975742b52c6c5acdcd44c4c9a3357 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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