Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,14 +4,14 @@ import numpy as np
|
|
4 |
##
|
5 |
token_value = "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"
|
6 |
#Loading the pre-trained model and the tokenizer
|
7 |
-
model_name = 'moro23/used-phones-price-prediction'
|
8 |
|
9 |
def predict_single(customer, dv, model):
|
10 |
X = dv.transform([customer])
|
11 |
y_pred = model.predict(X)
|
12 |
return y_pred[0]
|
13 |
|
14 |
-
with open(
|
15 |
dv, model = pickle.load(f_in)
|
16 |
|
17 |
|
|
|
4 |
##
|
5 |
token_value = "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"
|
6 |
#Loading the pre-trained model and the tokenizer
|
7 |
+
#model_name = 'moro23/used-phones-price-prediction'
|
8 |
|
9 |
def predict_single(customer, dv, model):
|
10 |
X = dv.transform([customer])
|
11 |
y_pred = model.predict(X)
|
12 |
return y_pred[0]
|
13 |
|
14 |
+
with open('price-prediction-model.bin', 'rb') as f_in:
|
15 |
dv, model = pickle.load(f_in)
|
16 |
|
17 |
|