Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,6 +4,14 @@ import numpy as np
|
|
| 4 |
import pickle
|
| 5 |
from sklearn.preprocessing import MinMaxScaler
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
st.image("https://pbs.twimg.com/media/DywhyJiXgAIUZej?format=jpg&name=medium")
|
| 8 |
st.title("Store Sales Prediction App")
|
| 9 |
st.caption("This app predicts sales patterns in different stores based on the inputs.")
|
|
|
|
| 4 |
import pickle
|
| 5 |
from sklearn.preprocessing import MinMaxScaler
|
| 6 |
|
| 7 |
+
# Load the scaler and model
|
| 8 |
+
with open('model_and_scaler.pkl', 'rb') as file:
|
| 9 |
+
model_and_scaler = pickle.load(file)
|
| 10 |
+
|
| 11 |
+
# Extract the scaler and model
|
| 12 |
+
scaler = model_and_scaler['scaler']
|
| 13 |
+
rf_model = model_and_scaler['model']
|
| 14 |
+
|
| 15 |
st.image("https://pbs.twimg.com/media/DywhyJiXgAIUZej?format=jpg&name=medium")
|
| 16 |
st.title("Store Sales Prediction App")
|
| 17 |
st.caption("This app predicts sales patterns in different stores based on the inputs.")
|