Commit b25c3251 authored by Larry Schultheis's avatar Larry Schultheis
Browse files

bad 500

500 has been TERMINATED
parent c02ba6c6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ def get_script():
    return send_from_directory('web/js', 'main.js', mimetype=doctype)

# Return the prediction label to the frontend
@app.route('/predict', methods=["GET"])
@app.route('/predict', methods=["POST"])
def predict():
    json = request.get_json()
    print(json)
+2 −2
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ function getPrediction() {
  
      var http = new XMLHttpRequest();
  
      http.open("GET", url + endpoint, true);
      http.open("POST", url + endpoint, true);
  
      http.onreadystatechange = function () {
          var DONE = 4;       // 4 means that the request is done
@@ -28,7 +28,7 @@ function getPrediction() {
              
          }
      }
      http.send();
      http.send(data);
}

// todo fix this to actually send the message data