DeepthiJ28's picture
Upload folder using huggingface_hub
5b95c6f verified
raw
history blame contribute delete
566 Bytes
import joblib
import pandas as pd
from flask import Flask, request, jsonify
import time
start = time.time()
# Initialize Flask app with a name
app = Flask("Superkart Sales Predictor")
# Load the trained churn prediction model
#model = joblib.load("superkart_sales_prediction_model_v1_0.joblib")
print(f"Model loaded in {time.time() - start:.2f} seconds")
# Define a route for the home page
@app.get('/')
def home():
return "Welcome to the Superkart Sales Prediction API"
# Run the Flask app in debug mode
if __name__ == '__main__':
app.run(debug=True)