Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -25,8 +25,18 @@ from sklearn.preprocessing import StandardScaler
|
|
25 |
from sklearn.ensemble import ExtraTreesRegressor
|
26 |
from sklearn.preprocessing import LabelEncoder
|
27 |
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
# use lambda function to remove \t make our model more robst
|
32 |
train = train.applymap(lambda x: x.replace("\t" , '' ) if isinstance (x , str) else x)
|
|
|
25 |
from sklearn.ensemble import ExtraTreesRegressor
|
26 |
from sklearn.preprocessing import LabelEncoder
|
27 |
|
28 |
+
import gdown
|
29 |
+
|
30 |
+
#train = pd.read_csv('https://drive.google.com/file/d/1U1ic5GE42_cxs8VvuOx7EDaHqtA0oEFC/view?usp=sharing.csv')
|
31 |
+
#https://drive.google.com/file/d/1U1ic5GE42_cxs8VvuOx7EDaHqtA0oEFC/view?usp=sharing
|
32 |
+
file_id = '1U1ic5GE42_cxs8VvuOx7EDaHqtA0oEFC'
|
33 |
+
# Define the URL to download the file
|
34 |
+
url = f'https://drive.google.com/uc?id={file_id}'
|
35 |
+
# Download the file and name it 'train.csv'
|
36 |
+
output_file = 'train.csv'
|
37 |
+
gdown.download(url, output_file, quiet=False)
|
38 |
+
# Read the CSV file with Pandas
|
39 |
+
train = pd.read_csv(output_file)
|
40 |
|
41 |
# use lambda function to remove \t make our model more robst
|
42 |
train = train.applymap(lambda x: x.replace("\t" , '' ) if isinstance (x , str) else x)
|