title: python as Backend and HTML as front end
body: <p>I am building a simple web application using HTML and Python to display image on canvas. Also I am using Flask framework for it.
  Where Image is uploaded from HTML and processed it in Opencv(Python) and then displayed on HTML made canvas, 
  what I have done so far is uploaded image only. But I couldn't displayed on canvas. </p>
  
  <p>here is the CSS and HTML code</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>p {
      font-family: verdana;
      font-size: 20px;
  }
  h2 {
      margin-left: 20px;
      text-align: center;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;link rel="stylesheet" type="text/css" href="static/test.css"&gt;
          &lt;title&gt;
              CV - Rogier
          &lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;h3&gt;
              Study
          &lt;/h3&gt;
          &lt;p&gt;
              &lt;form action="/hello" method="post"&gt;
             Asset Tag:&lt;br&gt;
             &lt;input type = "file" id = "Image"&gt; 
             &lt;button onclick="myFunction()"&gt;Try it&lt;/button&gt;
      &lt;script&gt;
      function myFunction() {
         var x = document.getElementById("Image");
         x.disabled = true;
      }
      &lt;/script&gt;
      &lt;input type="submit" value="Submit"&gt;
              &lt;/form&gt;
          &lt;/p&gt;       
          &lt;canvas id="myCanvas" width="640" height="400" style="border:1px solid #000000;"&gt;
  &lt;/canvas&gt;   
  &lt;script&gt;
  var n = document.getElementById("Image")
  var c = document.getElementById("myCanvas");
  var ctx = c.getContext("2d");
  ctx.font = "30px Arial";
  ctx.fillText(n, 10, 50);
  &lt;/script&gt;        
      &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>And Python code</p>
  
  <pre><code>from flask import Flask, render_template, request
  import cv2
  
  app = Flask(__name__)
  
  @app.route('/')
  def index():
      return render_template('test.html')
  
  @app.route('/hello', methods=['GET','POST'])
  def hello():
          if request.method == 'POST':
              image = request.form['Image']
              get_image = cv2.imread(image,0)
              return cv2.imshow(get_image)
          else:
              return render_template('test.html')
  
  
  if __name__ == '__main__':
      app.run(host = 'localhost', port = 3000, debug=True)
  </code></pre>
  
  <p>please tell me what I am missing and whats wrong!! Thanks</p>