title: NO error(State changed from up to crashe)
body: <p>2022-02-25T07:37:49.000000+00:00 app[api]: Build started by user mrmazores@tip.edu.ph
  2022-02-25T07:38:18.384694+00:00 app[api]: Release v4 created by user mrmazores@tip.edu.ph
  2022-02-25T07:38:18.384694+00:00 app[api]: Deploy d1afaaa1 by user mrmazores@tip.edu.ph
  2022-02-25T07:38:18.723319+00:00 heroku[worker.1]: State changed from crashed to starting
  2022-02-25T07:38:24.743621+00:00 heroku[worker.1]: Starting process with command <code>python server.ipynb</code>
  2022-02-25T07:38:25.365530+00:00 heroku[worker.1]: State changed from starting to up
  2022-02-25T07:38:25.695999+00:00 heroku[worker.1]: Process exited with status 0
  2022-02-25T07:38:25.753899+00:00 heroku[worker.1]: State changed from up to crashed
  2022-02-25T07:38:29.000000+00:00 app[api]: Build succeeded</p>
  <p><a href="https://i.stack.imgur.com/OOdGl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OOdGl.png" alt="" /></a></p>
  <p><a href="https://i.stack.imgur.com/nlQef.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nlQef.png" alt="" /></a></p>
  <p><a href="https://i.stack.imgur.com/ayMeR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ayMeR.png" alt="" /></a></p>
  <pre><code>from flask import Flask, request, jsonify
  import tensorflow as tf
  import os
  import numpy as np
  import json
  
  model = tf.keras.models.load_model(&quot;densenet201v1.hdf5&quot;)
  
  label = ('door_knock',
           'doorbell',
           'emergency_alarm ',
           'kettle_clicking',
           'kettle_running', 
           'kettle_whistling',
           'microwave_beeping' ,
           'microwave_running' ,
           'telephone',
           'wakeup_alarm',
           'washing_machine',
           'water_running')
  
  def print_prediction (x, db):
      predicted_vector=model.predict(x)
      predicted_proba=np.argmax(predicted_vector,axis=1)
      if label[predicted_proba[0]] == label[0] or label[predicted_proba[0]] == label[1] or label[predicted_proba[0]] == label[2] or label[predicted_proba[0]] == label[9]:
          #print(db)
          return label[predicted_proba[0]]
          #print(label[predicted_proba[0]])
          #print(predicted_vector[0][predicted_proba[0]])
          #print(predicted_vector[0])
      elif predicted_vector[0][predicted_proba[0]] &gt;= .50 and db &gt; -30.0:
          #print(db)
          return label[predicted_proba[0]]
          #print(predicted_vector[0][predicted_proba[0]])
          #print(label[predicted_proba[0]])
          #print(predicted_vector[0])
  
  app = Flask(__name__)
  
  @app.route(&quot;/&quot;, methods=[&quot;POST&quot;])
  def index():
      #get feature
      feature = np.array(request.json[&quot;feature&quot;])
      dB = np.array(request.json[&quot;dB&quot;])
      #make prediction
      prediction = print_prediction(feature, dB)
      #send in json format
      return jsonify({&quot;prediction&quot;: prediction})
  
  if __name__ == &quot;__main__&quot;:
      app.run(debug=False)
  </code></pre>
  <p>When I open the app I get:</p>
  <pre><code>2022-02-25T16:19:38.978905+00:00 heroku[router]: at=error code=H14 desc=&quot;No web processes running&quot; method=GET path=&quot;/&quot; host=home--ear.herokuapp.com request_id=4fa7e23f-7e43-46ec-99f1-cc5c8644f5e7 fwd=&quot;136.158.57.136&quot; dyno= connect= service= status=503 bytes= protocol=https
  </code></pre>