admattew commited on
Commit
5f47985
·
verified ·
1 Parent(s): 5441d85

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -6,7 +6,7 @@ import pandas as pd # For data manipulation
6
  from flask import Flask, request, jsonify # For creating the Flask API
7
 
8
  # Initialize Flask app with a name
9
- superkart_api = Flask("ABMs Nozzle Selection By AFWC Passing Pressure") #define the name of the app
10
 
11
  # Load the trained prediction model
12
  model = joblib.load("nozzle_selection.joblib") #define the location of the serialized model
@@ -46,7 +46,7 @@ def predict_nozzle():
46
  prediction = model.predict(input_data).tolist()[0]
47
 
48
  # Return the prediction as a JSON response
49
- return jsonify({'Nozzle': prediction})
50
 
51
  # Define an endpoint for batch prediction (POST request)
52
  @nozzleselect_api.post('/v1/predictbatch')
 
6
  from flask import Flask, request, jsonify # For creating the Flask API
7
 
8
  # Initialize Flask app with a name
9
+ superkart_api = Flask("ABMs-Nozzle-Selection") #define the name of the app
10
 
11
  # Load the trained prediction model
12
  model = joblib.load("nozzle_selection.joblib") #define the location of the serialized model
 
46
  prediction = model.predict(input_data).tolist()[0]
47
 
48
  # Return the prediction as a JSON response
49
+ return jsonify({'nozzle': prediction})
50
 
51
  # Define an endpoint for batch prediction (POST request)
52
  @nozzleselect_api.post('/v1/predictbatch')