title: This site can’t be reached [flask, python]
body: <p>when I open the link 0.0.0.0:5000 in my browser I always get the message on the browser "This site can't be reached"
  the code seems to be working since I get this message on the console </p>
  
  <blockquote>
    <p>Running on <a href="http://0.0.0.0:5000/" rel="noreferrer">http://0.0.0.0:5000/</a> (Press CTRL+C to quit)</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/6Pkd4.png" rel="noreferrer"><img src="https://i.stack.imgur.com/6Pkd4.png" alt="enter image description here"></a></p>
  
  <p>here is the code that I am using </p>
  
  <pre><code>from flask import Flask, render_template, request
  from scipy.misc import imsave, imread, imresize
  import numpy as np
  import keras.models
  import re
  import sys
  import os
  from load import *
  
  sys.path.append(os.path.abspath('./model'))
  app = Flask(__name__)
  global model, graph
  model, graph = init()
  
  def convertImage(imData):
      imgstr = re.search(r'base64(.*'.imData).group(1)
      with open('output.png', 'wb') as output:
          output.write(imgstr.decode('base64'))
  
  @app.route('/')
  def index():
      return render_template('index.html')
  
  @app.route('/predict', methods=['GET', 'POST'])
  def predict():
      imData = request.get_data()
      convertImage(imData)
      x = imread('output.png', mode = 'L')
      x = np.invert(x)
      x = imresize(x, 48, 48)
      x = x.reshape(1,48,48,1)
      with graph.as_default():
          out = model.predict(x)
          response = np.array_str(np.argmax(out))
          return response
  
  
  
  if __name__ == "__main__":
      port = int(os.environ.get('PORT', 5000))
      app.run(host='0.0.0.0', port=port)
  </code></pre>