fix page
This commit is contained in:
@ -72,7 +72,7 @@ def navbar():
|
||||
<img src="data:image/png;base64,{get_image_as_base64(logo_path)}" alt="Logo">
|
||||
</div>
|
||||
<div class="navbar-center">
|
||||
Halaman Prediksi
|
||||
Halaman Dashboard
|
||||
</div>
|
||||
<div class="navbar-right">
|
||||
""", unsafe_allow_html=True)
|
||||
|
@ -112,7 +112,7 @@ def navbar():
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
cursor: pointer;
|
||||
margin-top: 8px;
|
||||
margin-top: 6px !important;
|
||||
width: 100%;
|
||||
}}
|
||||
.stButton > button:hover {{
|
||||
@ -131,7 +131,7 @@ def navbar():
|
||||
<img src="data:image/png;base64,{get_image_as_base64(logo_path)}" alt="Logo">
|
||||
</div>
|
||||
<div class="navbar-center">
|
||||
Halaman Prediksi
|
||||
Form Keluhan
|
||||
</div>
|
||||
<div class="navbar-right">
|
||||
""", unsafe_allow_html=True)
|
||||
@ -209,25 +209,6 @@ def menu():
|
||||
div[data-testid="column"]:nth-child(3) button:hover {
|
||||
background-color: #2C3E50 !important; /* Warna biru lebih gelap saat hover */
|
||||
}
|
||||
|
||||
.stButton > button {
|
||||
background-color: #264CBE;
|
||||
color: white;
|
||||
font-family: 'Inter', sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
cursor: pointer;
|
||||
margin-top: 20px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.stButton > button:hover {
|
||||
background-color: #ffffff;
|
||||
color: #264CBE;
|
||||
}
|
||||
</style>
|
||||
""",
|
||||
unsafe_allow_html=True
|
||||
|
@ -50,6 +50,7 @@ def navbar():
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
border: none;
|
||||
margin-top: 6px !important;
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
cursor: pointer;
|
||||
@ -72,7 +73,7 @@ def navbar():
|
||||
<img src="data:image/png;base64,{get_image_as_base64(logo_path)}" alt="Logo">
|
||||
</div>
|
||||
<div class="navbar-center">
|
||||
Halaman Prediksi
|
||||
Form Kepuasan Kerja
|
||||
</div>
|
||||
<div class="navbar-right">
|
||||
""", unsafe_allow_html=True)
|
||||
@ -150,25 +151,6 @@ def menu():
|
||||
div[data-testid="column"]:nth-child(3) button:hover {
|
||||
background-color: #2C3E50 !important; /* Warna biru lebih gelap saat hover */
|
||||
}
|
||||
|
||||
.stButton > button {
|
||||
background-color: #264CBE;
|
||||
color: white;
|
||||
font-family: 'Inter', sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
cursor: pointer;
|
||||
margin-top: 20px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.stButton > button:hover {
|
||||
background-color: #ffffff;
|
||||
color: #264CBE;
|
||||
}
|
||||
</style>
|
||||
""",
|
||||
unsafe_allow_html=True
|
||||
|
@ -55,7 +55,7 @@ def navbar():
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
cursor: pointer;
|
||||
margin-top: 8px;
|
||||
margin-top: 8px !important;
|
||||
width: 100%;
|
||||
}}
|
||||
.stButton > button:hover {{
|
||||
@ -74,7 +74,7 @@ def navbar():
|
||||
<img src="data:image/png;base64,{get_image_as_base64(logo_path)}" alt="Logo">
|
||||
</div>
|
||||
<div class="navbar-center">
|
||||
Halaman Prediksi
|
||||
Form Penilaian Kinerja Karyawan
|
||||
</div>
|
||||
<div class="navbar-right">
|
||||
""", unsafe_allow_html=True)
|
||||
@ -152,25 +152,6 @@ def menu():
|
||||
div[data-testid="column"]:nth-child(3) button:hover {
|
||||
background-color: #2C3E50 !important; /* Warna biru lebih gelap saat hover */
|
||||
}
|
||||
|
||||
.stButton > button {
|
||||
background-color: #264CBE;
|
||||
color: white;
|
||||
font-family: 'Inter', sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
cursor: pointer;
|
||||
margin-top: 20px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.stButton > button:hover {
|
||||
background-color: #ffffff;
|
||||
color: #264CBE;
|
||||
}
|
||||
</style>
|
||||
""",
|
||||
unsafe_allow_html=True
|
||||
|
@ -51,7 +51,9 @@ def get_shap_top_features():
|
||||
conn = connect_to_db()
|
||||
if conn:
|
||||
try:
|
||||
query = "SELECT employee_id as ID_Karyawan, shap_values FROM shap_pred_result"
|
||||
query = """SELECT a.employee_id as ID_Karyawan, a.shap_values, b.hasil_prediksi_klasifikasi as Hasil_Prediksi_Retensi,
|
||||
b.hasil_prediksi_regresi as Hasil_Prediksi_Lama_Kerja
|
||||
FROM shap_pred_result a inner join history_prediction b on a.employee_id = b.employee_id"""
|
||||
df = pd.read_sql(query, conn)
|
||||
|
||||
# Ekstraksi dan format ulang shap_values
|
||||
@ -75,7 +77,9 @@ def get_shap_top_features():
|
||||
|
||||
# Buat format tabel baru
|
||||
formatted_row = {
|
||||
"ID_Karyawan": employee_id
|
||||
"ID_Karyawan": employee_id,
|
||||
"Hasil_Prediksi_Retensi": row["Hasil_Prediksi_Retensi"], # Tambahkan ini!
|
||||
"Hasil_Prediksi_Lama_Kerja": row["Hasil_Prediksi_Lama_Kerja"], # Tambahkan ini!
|
||||
}
|
||||
for i, (feature, value) in enumerate(top_features, start=1):
|
||||
formatted_row[f"Nama_Fitur_{i}"] = feature
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user