summaryrefslogblamecommitdiffstats
path: root/predict.py
blob: 6864f9c1d7a61be2636e51ff5d245e0d24e570fb (plain) (tree)

























                                                            
mport 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")