summaryrefslogtreecommitdiffstats
path: root/predict.py
diff options
context:
space:
mode:
Diffstat (limited to 'predict.py')
-rw-r--r--predict.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/predict.py b/predict.py
new file mode 100644
index 0000000..6864f9c
--- /dev/null
+++ b/predict.py
@@ -0,0 +1,26 @@
+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")