File size: 1,275 Bytes
05355ae
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{% extends 'layout.html' %} {% block body %}


<style>
  html body {
    background-color: rgb(206, 206, 228);
  }
</style>
<br /><br />
  <h2 style="text-align: center; margin: 0px; color: black">
    <b>Find out which disease has been caught by your plant</b>
  </h2>
  <br />
  <br>

<div style="
    width: 350px;
    height: 50rem;
    margin: 0px auto;
    color: black;
    border-radius: 25px;
    padding: 10px 10px;
    font-weight: bold;
  ">

  


  <form class="form-signin" method=post enctype=multipart/form-data>

    <h2 class="h4 mb-3 font-weight-normal"><b>Please Upload The Image</b></h2>
    <input type="file" name="file" class="form-control-file" id="inputfile" onchange="preview_image(event)" style="font-weight: bold;">
    <br>
    <br>
    <img id="output-image" class="rounded mx-auto d-block" />
    <button class="btn btn-lg btn-primary btn-block" type="submit" style="font-weight: bold;">Predict</button>


  </form>
</div>

<script type="text/javascript">
  function preview_image(event) {
    var reader = new FileReader();
    reader.onload = function () {
      var output = document.getElementById('output-image')
      output.src = reader.result;
    }
    reader.readAsDataURL(event.target.files[0]);
  }
</script>

</div>
{% endblock %}