import joblib import pandas as pd # Load the model model = joblib.load('model.pkl') # Sample data for prediction data = { 'Kilometers_Driven': [50000], 'Fuel_Type': ['Petrol'], 'Transmission': ['Manual'], 'Owner_Type': ['First'], 'Engine CC': [1197], 'Power': [82], 'Seats': [5], 'Car_Age': [6], 'Location': ['Mumbai'] } # Convert to DataFrame input_data = pd.DataFrame(data) # Predict predicted_mileage = model.predict(input_data) print(f"Predicted Mileage: {predicted_mileage[0]:.2f} Km/L")