title: Show numpy array as image in Django
body: <p>I am new to Django framework. I am building a website that take an image from user, then process the image and return to a numpy array (processed image). I want to show the numpy array as image. How can I do that? Thank you for reading and helps?</p>
  
  <p><strong>index.html</strong></p>
  
  <pre><code>&lt;form name="image" method = "post" enctype="multipart/form-data"&gt;
      {% csrf_token %}
      {{ form.as_p }}
      &lt;button type="submit"&gt;Upload&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>Index view</strong></p>
  
  <pre><code>def index(request):
      if request.method == 'POST':
          form = UploadFileForm(request.POST, request.FILES)
          if form.is_valid():
              model = MyDeepLearningModel.get_instance()
              file_name = request.FILES['file']
  
              processed_image = model.run_png(file_name) #processed_image is an numpy array
  
              #how to show the processed_image in index.html?
              return render(request, 'lowlighten/index.html')
      else:
          form = UploadFileForm()
      return render(request, 'lowlighten/index.html', {'form': form})
  </code></pre>