Spaces:
Runtime error
Runtime error
| 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 | |
| def home(): | |
| return "Welcome to the Superkart Sales Prediction API" | |
| # Run the Flask app in debug mode | |
| if __name__ == '__main__': | |
| app.run(debug=True) | |