iqranaz commited on
Commit
cb3a3a4
·
verified ·
1 Parent(s): c7a2549

Update train/train.py

Browse files
Files changed (1) hide show
  1. train/train.py +8 -1
train/train.py CHANGED
@@ -1,9 +1,16 @@
1
  import pandas as pd
2
- import lightgbm as lgb
3
  from sklearn.model_selection import train_test_split
4
  from sklearn.preprocessing import LabelEncoder
5
  from imblearn.over_sampling import SMOTE
6
 
 
 
 
 
 
 
 
 
7
  # Load the dataset
8
  file_path = 'datasets' # Update with your dataset path
9
  df = pd.read_excel(file_path + '/dataset.xlsx')
 
1
  import pandas as pd
 
2
  from sklearn.model_selection import train_test_split
3
  from sklearn.preprocessing import LabelEncoder
4
  from imblearn.over_sampling import SMOTE
5
 
6
+ try:
7
+ import lightgbm as lgb
8
+ except:
9
+ print("An exception occurred")
10
+ !pip install lightgbm
11
+ import lightgbm as lgb
12
+
13
+
14
  # Load the dataset
15
  file_path = 'datasets' # Update with your dataset path
16
  df = pd.read_excel(file_path + '/dataset.xlsx')