Skip to content

Instantly share code, notes, and snippets.



Last active Mar 23, 2020
What would you like to do?
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<title>MNIST Flask app</title>
<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">
{% if uploaded %}
<span style="font-size:18px">Prediction Result: {{ prediction }}</span>
<img src="{{ imgpath }}" width="320">
{% else %}
<span style="font-size:18px">Prediction Result: --upload a picture!--</span>
{% endif %}
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.