namngo commited on
Commit
bd59827
·
verified ·
1 Parent(s): 7acaac6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -247,8 +247,12 @@ else:
247
  if st.button("🎯 DỰ BÁO"):
248
  if model_type == "Dùng toàn bộ dữ liệu":
249
  prediction = model_full.predict(final_features)
 
 
250
  else:
251
  prediction = model_important.predict(final_features)
 
 
252
 
253
  if prediction[0] == 1:
254
  st.success(f"🎉 Chúc mừng bạn {name} - {major}! Bạn có khả năng tốt nghiệp đúng hạn!")
@@ -263,4 +267,4 @@ if st.button("🎯 DỰ BÁO"):
263
  # st.write("Available sheet names:", sheet_names)
264
 
265
  # Ghi log lên Google Sheets
266
- save_to_gsheet(name, student_id, major, prediction, data) # Pass data to save function
 
247
  if st.button("🎯 DỰ BÁO"):
248
  if model_type == "Dùng toàn bộ dữ liệu":
249
  prediction = model_full.predict(final_features)
250
+ sheet_name = "Trang tính1" # For full data model, save to Trang tính1
251
+
252
  else:
253
  prediction = model_important.predict(final_features)
254
+ sheet_name = "Trang tính2" # For full data model, save to Trang tính1
255
+
256
 
257
  if prediction[0] == 1:
258
  st.success(f"🎉 Chúc mừng bạn {name} - {major}! Bạn có khả năng tốt nghiệp đúng hạn!")
 
267
  # st.write("Available sheet names:", sheet_names)
268
 
269
  # Ghi log lên Google Sheets
270
+ save_to_gsheet(name, student_id, major, prediction, data,sheet_name) # Pass data to save function