blob: 225710908ee635e4da4426acc6323b6ee90fae64 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/usr/bin/env python3.7
from model import Model
def predict_input(m):
while True:
try:
x = int(input("Enter a mileage: "))
except ValueError:
print("Bad input, you should enter a number")
else:
break
print("The predicted price for this mileage is", m.make_prediction(x))
if __name__ == "__main__":
m = Model(thetafilename="./theta")
predict_input(m)
|