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">
|
<img src="data:image/png;base64,{get_image_as_base64(logo_path)}" alt="Logo">
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-center">
|
<div class="navbar-center">
|
||||||
Halaman Prediksi
|
Halaman Dashboard
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-right">
|
<div class="navbar-right">
|
||||||
""", unsafe_allow_html=True)
|
""", unsafe_allow_html=True)
|
||||||
|
@ -112,7 +112,7 @@ def navbar():
|
|||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin-top: 8px;
|
margin-top: 6px !important;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}}
|
}}
|
||||||
.stButton > button:hover {{
|
.stButton > button:hover {{
|
||||||
@ -131,7 +131,7 @@ def navbar():
|
|||||||
<img src="data:image/png;base64,{get_image_as_base64(logo_path)}" alt="Logo">
|
<img src="data:image/png;base64,{get_image_as_base64(logo_path)}" alt="Logo">
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-center">
|
<div class="navbar-center">
|
||||||
Halaman Prediksi
|
Form Keluhan
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-right">
|
<div class="navbar-right">
|
||||||
""", unsafe_allow_html=True)
|
""", unsafe_allow_html=True)
|
||||||
@ -209,25 +209,6 @@ def menu():
|
|||||||
div[data-testid="column"]:nth-child(3) button:hover {
|
div[data-testid="column"]:nth-child(3) button:hover {
|
||||||
background-color: #2C3E50 !important; /* Warna biru lebih gelap saat 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>
|
</style>
|
||||||
""",
|
""",
|
||||||
unsafe_allow_html=True
|
unsafe_allow_html=True
|
||||||
|
@ -50,6 +50,7 @@ def navbar():
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
border: none;
|
border: none;
|
||||||
|
margin-top: 6px !important;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@ -72,7 +73,7 @@ def navbar():
|
|||||||
<img src="data:image/png;base64,{get_image_as_base64(logo_path)}" alt="Logo">
|
<img src="data:image/png;base64,{get_image_as_base64(logo_path)}" alt="Logo">
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-center">
|
<div class="navbar-center">
|
||||||
Halaman Prediksi
|
Form Kepuasan Kerja
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-right">
|
<div class="navbar-right">
|
||||||
""", unsafe_allow_html=True)
|
""", unsafe_allow_html=True)
|
||||||
@ -150,25 +151,6 @@ def menu():
|
|||||||
div[data-testid="column"]:nth-child(3) button:hover {
|
div[data-testid="column"]:nth-child(3) button:hover {
|
||||||
background-color: #2C3E50 !important; /* Warna biru lebih gelap saat 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>
|
</style>
|
||||||
""",
|
""",
|
||||||
unsafe_allow_html=True
|
unsafe_allow_html=True
|
||||||
|
@ -55,7 +55,7 @@ def navbar():
|
|||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin-top: 8px;
|
margin-top: 8px !important;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}}
|
}}
|
||||||
.stButton > button:hover {{
|
.stButton > button:hover {{
|
||||||
@ -74,7 +74,7 @@ def navbar():
|
|||||||
<img src="data:image/png;base64,{get_image_as_base64(logo_path)}" alt="Logo">
|
<img src="data:image/png;base64,{get_image_as_base64(logo_path)}" alt="Logo">
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-center">
|
<div class="navbar-center">
|
||||||
Halaman Prediksi
|
Form Penilaian Kinerja Karyawan
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-right">
|
<div class="navbar-right">
|
||||||
""", unsafe_allow_html=True)
|
""", unsafe_allow_html=True)
|
||||||
@ -152,25 +152,6 @@ def menu():
|
|||||||
div[data-testid="column"]:nth-child(3) button:hover {
|
div[data-testid="column"]:nth-child(3) button:hover {
|
||||||
background-color: #2C3E50 !important; /* Warna biru lebih gelap saat 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>
|
</style>
|
||||||
""",
|
""",
|
||||||
unsafe_allow_html=True
|
unsafe_allow_html=True
|
||||||
|
@ -51,7 +51,9 @@ def get_shap_top_features():
|
|||||||
conn = connect_to_db()
|
conn = connect_to_db()
|
||||||
if conn:
|
if conn:
|
||||||
try:
|
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)
|
df = pd.read_sql(query, conn)
|
||||||
|
|
||||||
# Ekstraksi dan format ulang shap_values
|
# Ekstraksi dan format ulang shap_values
|
||||||
@ -75,7 +77,9 @@ def get_shap_top_features():
|
|||||||
|
|
||||||
# Buat format tabel baru
|
# Buat format tabel baru
|
||||||
formatted_row = {
|
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):
|
for i, (feature, value) in enumerate(top_features, start=1):
|
||||||
formatted_row[f"Nama_Fitur_{i}"] = feature
|
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