Skip to content

Commit

Permalink
updated dlflask html
Browse files Browse the repository at this point in the history
  • Loading branch information
alvertogit committed Aug 4, 2024
1 parent 186d9e9 commit ab77b1d
Showing 1 changed file with 78 additions and 62 deletions.
140 changes: 78 additions & 62 deletions app/app/templates/dlflask.html
Original file line number Diff line number Diff line change
@@ -1,62 +1,78 @@
<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML>
<HEAD>
<TITLE>
Predict handwritten digits
</TITLE>
</HEAD>
<BODY>
<H1>Predict handwritten digits</H1>
<P>A handwritten example image of a digit is shown below.</P>
<P><img src="{{ url_for('static',filename="4.jpg")}}"></P>
<P>The value of the digit that can be predicted using a Deep Learning model.</P>
<P>POST example using curl:</P>
<P>curl -F file=@app/app/static/4.jpg -X POST 'http://127.0.0.1/api/predictlabel'</P>
<P>{
"most_probable_label": "4",
"predictions": [
{
"label": "0",
"probability": "8.55888e-09"
},
{
"label": "1",
"probability": "1.952776e-05"
},
{
"label": "2",
"probability": "1.6258126e-06"
},
{
"label": "3",
"probability": "6.6119924e-07"
},
{
"label": "4",
"probability": "0.9931753"
},
{
"label": "5",
"probability": "8.9275824e-07"
},
{
"label": "6",
"probability": "3.894695e-06"
},
{
"label": "7",
"probability": "0.0067486116"
},
{
"label": "8",
"probability": "9.569092e-06"
},
{
"label": "9",
"probability": "3.984138e-05"
}
],
"success": true
}</P>
</BODY>
</HTML>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Predict handwritten digits</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
</head>
<body>
<div class="container">
<h2>Predict handwritten digits</h2>
<p>A handwritten example image of a digit is shown below.</p>
<img src="{{ url_for('static', filename='4.jpg') }}" class="img-fluid img-thumbnail">
<p>The value of the digit that can be predicted using a Deep Learning model.</p>

<h4>POST example using curl</h4>
<div class="card-group">
<div class="card">
<div class="card-header">curl -F file=@app/app/static/4.jpg -X POST 'http://127.0.0.1/api/predictlabel'</div>
<div class="card-body">
<pre>
{
"most_probable_label": "4",
"predictions": [
{
"label": "0",
"probability": "8.55888e-09"
},
{
"label": "1",
"probability": "1.952776e-05"
},
{
"label": "2",
"probability": "1.6258126e-06"
},
{
"label": "3",
"probability": "6.6119924e-07"
},
{
"label": "4",
"probability": "0.9931753"
},
{
"label": "5",
"probability": "8.9275824e-07"
},
{
"label": "6",
"probability": "3.894695e-06"
},
{
"label": "7",
"probability": "0.0067486116"
},
{
"label": "8",
"probability": "9.569092e-06"
},
{
"label": "9",
"probability": "3.984138e-05"
}
],
"success": true
}
</pre>
</div>
</div>
</div>
<br>
<h5>CREDITS</h5>
<p>author: alvertogit<br>copyright: 2018-2024</p>
</div>
</body>
</html>

0 comments on commit ab77b1d

Please sign in to comment.