Spaces:
Sleeping
Sleeping
skanderovitch
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -73,7 +73,7 @@ def get_filename():
|
|
73 |
choice = np.random.choice(embeddings.index)
|
74 |
url = get_s3_url(choice)
|
75 |
if check_image_url_accessible(url):
|
76 |
-
|
77 |
return choice
|
78 |
else:
|
79 |
return get_filename()
|
@@ -115,7 +115,7 @@ def train_model(X,labels):
|
|
115 |
return
|
116 |
train_data = lgb.Dataset(X, label=labels)
|
117 |
num_round = 10
|
118 |
-
param = {'num_leaves':10, 'objective': 'binary', 'metric' : 'binary'}
|
119 |
bst = lgb.train(param, train_data, num_round)
|
120 |
in_sample_preds = bst.predict(X)
|
121 |
in_sample_score = np.corrcoef([in_sample_preds,np.array(labels)])[0][1]
|
|
|
73 |
choice = np.random.choice(embeddings.index)
|
74 |
url = get_s3_url(choice)
|
75 |
if check_image_url_accessible(url):
|
76 |
+
|
77 |
return choice
|
78 |
else:
|
79 |
return get_filename()
|
|
|
115 |
return
|
116 |
train_data = lgb.Dataset(X, label=labels)
|
117 |
num_round = 10
|
118 |
+
param = {'num_leaves':10, 'objective': 'binary', 'metric' : 'binary', 'lambda_l2': 0.1}
|
119 |
bst = lgb.train(param, train_data, num_round)
|
120 |
in_sample_preds = bst.predict(X)
|
121 |
in_sample_score = np.corrcoef([in_sample_preds,np.array(labels)])[0][1]
|