Spaces:
Sleeping
Sleeping
Update app.py
Browse files277 unmodified lines278279280281282283284285286287288289290291292293294295296277 unmodified linesif model_type == "Dùng toàn bộ đặc trưng":prediction = model_full.predict(final_features)sheet_name = "Trang tính1" # For full data model, save to Trang tính1else:prediction = model_important.predict(final_features)sheet_name = "Trang tính2" # For full data model, save to Trang tính1if prediction[0] == 0:# st.success(f"Dự đoán là : {prediction[0]}")st.success(f"🎉 Chúc mừng bạn {name} - {major}! Bạn có khả năng tốt nghiệp đúng hạn!")st.balloons()else:st.error(f"⚠️ Bạn {name} - {major} cần cố gắng hơn! Có nguy cơ trễ hạn.")st.snow()# # Debugging: List all sheet names# sheet_id = "1i7bDNvLVLXN93_e-FN0JLzpg1jb64Z_aEuyPjIfwbdQ" # Use your actual Spreadsheet ID277 unmodified lines278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310277 unmodified linesif model_type == "Dùng toàn bộ đặc trưng":prediction = model_full.predict(final_features)sheet_name = "Trang tính1" # For full data model, save to Trang tính1if prediction[0] == 0:# st.success(f"Dự đoán là : {prediction[0]}")st.success(f"🎉 Chúc mừng bạn {name} - {major}! Bạn có khả năng tốt nghiệp đúng hạn!")st.balloons()else:st.error(f"⚠️ Bạn {name} - {major} cần cố gắng hơn! Có nguy cơ trễ hạn.")st.snow()else:prediction = model_important.predict(final_features)sheet_name = "Trang tính2" # For full data model, save to Trang tính1if prediction[0] == 1:# st.success(f"Dự đoán là : {prediction[0]}")st.success(f"🎉 Chúc mừng bạn {name} - {major}! Bạn có khả năng tốt nghiệp đúng hạn!")st.balloons()else:st.error(f"⚠️ Bạn {name} - {major} cần cố gắng hơn! Có nguy cơ trễ hạn.")st.snow()# if prediction[0] == 0:# # st.success(f"Dự đoán là : {prediction[0]}")# st.success(f"🎉 Chúc mừng bạn {name} - {major}! Bạn có khả năng tốt nghiệp đúng hạn!")# st.balloons()# else:# st.error(f"⚠️ Bạn {name} - {major} cần cố gắng hơn! Có nguy cơ trễ hạn.")# st.snow()# # Debugging: List all sheet names# sheet_id = "1i7bDNvLVLXN93_e-FN0JLzpg1jb64Z_aEuyPjIfwbdQ" # Use your actual Spreadsheet ID
app.py+23-9