skanderovitch commited on
Commit
b0bb9db
·
verified ·
1 Parent(s): f9616f0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -65,7 +65,7 @@ def get_filename():
65
  st.session_state.pred = st.session_state.preds[choice]
66
  url = get_s3_url(embeddings.index[choice])
67
  if check_image_url_accessible(url):
68
- st.toast(url)
69
  return embeddings.index[choice]
70
  else:
71
  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 = {'objective': 'binary', 'metric' : 'auc', 'lambda_l2': 0.5}
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]
 
65
  st.session_state.pred = st.session_state.preds[choice]
66
  url = get_s3_url(embeddings.index[choice])
67
  if check_image_url_accessible(url):
68
+
69
  return embeddings.index[choice]
70
  else:
71
  return get_filename()
 
115
  return
116
  train_data = lgb.Dataset(X, label=labels)
117
  num_round = 10
118
+ param = {'num_leaves': 30, '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]