niladridutta commited on
Commit
3254423
·
verified ·
1 Parent(s): 585fc80

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -3,7 +3,7 @@ import pandas as pd
3
  import numpy as np
4
  from sklearn.feature_extraction.text import CountVectorizer
5
  from sklearn.ensemble import RandomForestClassifier
6
- import pickle
7
 
8
  import warnings
9
  warnings.filterwarnings('ignore')
@@ -71,7 +71,7 @@ if uploaded_file is not None:
71
  df_ext = pd.concat([df, text_vectors_df],axis=1)
72
  df = df_ext.drop(['GMN','Product_Description','EA_GTIN','CV_GTIN'],axis=1)
73
 
74
- loaded_model = pickle.load(open('rfc_model_grid.pkl', 'rb'))
75
  result = loaded_model.predict(df)
76
  data['Product_Type_Predicted']=result
77
 
 
3
  import numpy as np
4
  from sklearn.feature_extraction.text import CountVectorizer
5
  from sklearn.ensemble import RandomForestClassifier
6
+ import joblib
7
 
8
  import warnings
9
  warnings.filterwarnings('ignore')
 
71
  df_ext = pd.concat([df, text_vectors_df],axis=1)
72
  df = df_ext.drop(['GMN','Product_Description','EA_GTIN','CV_GTIN'],axis=1)
73
 
74
+ loaded_model = joblib.load(open('rfc_model_grid.sav', 'rb'))
75
  result = loaded_model.predict(df)
76
  data['Product_Type_Predicted']=result
77