Spaces:
Runtime error
Runtime error
Upload folder using huggingface_hub
Browse files
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("
|
| 10 |
|
| 11 |
# Load the trained churn prediction model
|
| 12 |
model = joblib.load("backend_files/rf_tuned.joblib") #Complete the code to define the location of the serialized model
|
|
@@ -14,7 +14,7 @@ model = joblib.load("backend_files/rf_tuned.joblib") #Complete the code to defin
|
|
| 14 |
# Define a route for the home page
|
| 15 |
@superkart_api.get('/')
|
| 16 |
def home():
|
| 17 |
-
return "Welcome to
|
| 18 |
|
| 19 |
# Define an endpoint to predict churn for a single customer
|
| 20 |
@superkart_api.post('/v1/predict')
|
|
|
|
| 6 |
from flask import Flask, request, jsonify # For creating the Flask API
|
| 7 |
|
| 8 |
# Initialize Flask app with a name
|
| 9 |
+
superkart_api = Flask("SuperKarts forecast engine")
|
| 10 |
|
| 11 |
# Load the trained churn prediction model
|
| 12 |
model = joblib.load("backend_files/rf_tuned.joblib") #Complete the code to define the location of the serialized model
|
|
|
|
| 14 |
# Define a route for the home page
|
| 15 |
@superkart_api.get('/')
|
| 16 |
def home():
|
| 17 |
+
return "Welcome to SuperKarts forecast engine" #Complete the code to define a welcome message
|
| 18 |
|
| 19 |
# Define an endpoint to predict churn for a single customer
|
| 20 |
@superkart_api.post('/v1/predict')
|