diff --git a/Price Prediction/Controllers/PredictionController.cs b/Price Prediction/Controllers/PredictionController.cs index 1fd0c16..68f31cb 100644 --- a/Price Prediction/Controllers/PredictionController.cs +++ b/Price Prediction/Controllers/PredictionController.cs @@ -16,7 +16,8 @@ public IActionResult Price(ModelInput input) // Try model on sample data to predict fair price ModelOutput result = predEngine.Predict(input); - + if (input.Passenger_count == 0 && input.Trip_distance == 0 && input.Trip_time_in_secs == 0) + result.Score = 0; ViewBag.Price = result.Score; return View(input); } diff --git a/Price Prediction/Views/Prediction/Price.cshtml b/Price Prediction/Views/Prediction/Price.cshtml index 24be863..6e111d9 100644 --- a/Price Prediction/Views/Prediction/Price.cshtml +++ b/Price Prediction/Views/Prediction/Price.cshtml @@ -1,54 +1,73 @@ @model PricePredictionML.Model.DataModels.ModelInput - @{ ViewData["Title"] = "Price Prediction Using ML.NET"; } - -

Price Prediction using ML.NET

- -
-
-
-
-
- -
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- -
-
-
-
- @if(ViewBag.Price!=null) - { -

Result

-

Fare Price:@ViewBag.Price

- } -
-
- @section Scripts { @{await Html.RenderPartialAsync("_ValidationScriptsPartial");} } + + + + + + + + + + +

Price Prediction using ML.NET

+ +
+
+
+
+
+ +
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + +
+
+
+
+ +

Result :

+
+
+ + + \ No newline at end of file