Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +2 -3
src/streamlit_app.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
import pandas as pd
|
| 3 |
-
import
|
| 4 |
-
import numpy as np
|
| 5 |
|
| 6 |
st.set_page_config(layout="centered", page_title="Predict Music Genre")
|
| 7 |
|
|
@@ -37,7 +36,7 @@ response = [
|
|
| 37 |
def load_model(path="./src/xgb_classifier_pipeline.pkl"):
|
| 38 |
try:
|
| 39 |
with open(path, "rb") as f:
|
| 40 |
-
model =
|
| 41 |
return model
|
| 42 |
except FileNotFoundError:
|
| 43 |
st.error(
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import pandas as pd
|
| 3 |
+
import cloudpickle
|
|
|
|
| 4 |
|
| 5 |
st.set_page_config(layout="centered", page_title="Predict Music Genre")
|
| 6 |
|
|
|
|
| 36 |
def load_model(path="./src/xgb_classifier_pipeline.pkl"):
|
| 37 |
try:
|
| 38 |
with open(path, "rb") as f:
|
| 39 |
+
model = cloudpickle.load(f)
|
| 40 |
return model
|
| 41 |
except FileNotFoundError:
|
| 42 |
st.error(
|