Spaces:
Build error
Build error
Update inference/predict.py
Browse files- inference/predict.py +3 -1
inference/predict.py
CHANGED
|
@@ -2,12 +2,14 @@ import pandas as pd
|
|
| 2 |
#import lightgbm as lgb
|
| 3 |
from sklearn.preprocessing import LabelEncoder
|
| 4 |
from scipy.stats import boxcox
|
|
|
|
|
|
|
| 5 |
|
| 6 |
try:
|
| 7 |
import lightgbm as lgb
|
| 8 |
except:
|
| 9 |
print("An exception occurred")
|
| 10 |
-
|
| 11 |
import lightgbm as lgb
|
| 12 |
|
| 13 |
def preprocess_input(input_data):
|
|
|
|
| 2 |
#import lightgbm as lgb
|
| 3 |
from sklearn.preprocessing import LabelEncoder
|
| 4 |
from scipy.stats import boxcox
|
| 5 |
+
import subprocess
|
| 6 |
+
import sys
|
| 7 |
|
| 8 |
try:
|
| 9 |
import lightgbm as lgb
|
| 10 |
except:
|
| 11 |
print("An exception occurred")
|
| 12 |
+
subprocess.run([sys.executable, "-m", "pip", "install", "lightgbm"])
|
| 13 |
import lightgbm as lgb
|
| 14 |
|
| 15 |
def preprocess_input(input_data):
|