barentz96 commited on
Commit
3bc837e
1 Parent(s): cc187b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -35,12 +35,16 @@ if st.button('Predict'):
35
  'hours_per_week': hours_per_week, 'new_occupation': occu, 'sex':sex},index=[0])
36
 
37
  hasil_log_reg = model_log_reg.predict(data_inf)[0]
 
 
 
 
38
  st.write(f'Kelas Pendapatan Anda Menurut Model Logistic Regression: {hasil_log_reg}')
39
 
40
  hasil_svm = model_svc.predict(data_inf)[0]
41
  if hasil_svm == 0:
42
- hasil_svm = '<=50K'
43
  else:
44
- hasil_svm = '>50K'
45
  st.write(f'Kelas Pendapatan Anda Menurut Model Logistic SVC : {hasil_svm}')
46
 
 
35
  'hours_per_week': hours_per_week, 'new_occupation': occu, 'sex':sex},index=[0])
36
 
37
  hasil_log_reg = model_log_reg.predict(data_inf)[0]
38
+ if hasil_log_reg == 0:
39
+ hasil_log_reg = 'Dibawah $ 50.000 Per Tahun'
40
+ else:
41
+ hasil_log_reg = 'Diatas $ 50.000 Per Tahun'
42
  st.write(f'Kelas Pendapatan Anda Menurut Model Logistic Regression: {hasil_log_reg}')
43
 
44
  hasil_svm = model_svc.predict(data_inf)[0]
45
  if hasil_svm == 0:
46
+ hasil_svm = 'Dibawah $ 50.000 Per Tahun'
47
  else:
48
+ hasil_svm = 'Diatas $ 50.000 Per Tahun'
49
  st.write(f'Kelas Pendapatan Anda Menurut Model Logistic SVC : {hasil_svm}')
50