Spaces:
Runtime error
Runtime error
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -6,13 +6,13 @@ 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 |
-
|
| 10 |
|
| 11 |
# Load the trained prediction model
|
| 12 |
model = joblib.load("nozzle_selection.joblib") #define the location of the serialized model
|
| 13 |
|
| 14 |
# Define a route for the home page
|
| 15 |
-
@
|
| 16 |
def home():
|
| 17 |
"""
|
| 18 |
This function handles GET requests to the root URL ('/') of the API.
|
|
|
|
| 6 |
from flask import Flask, request, jsonify # For creating the Flask API
|
| 7 |
|
| 8 |
# Initialize Flask app with a name
|
| 9 |
+
nozzleselect_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
|
| 13 |
|
| 14 |
# Define a route for the home page
|
| 15 |
+
@nozzleselect_api.get('/')
|
| 16 |
def home():
|
| 17 |
"""
|
| 18 |
This function handles GET requests to the root URL ('/') of the API.
|