Pushpak21 commited on
Commit
85b8bcb
·
verified ·
1 Parent(s): f680567

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +15 -5
src/streamlit_app.py CHANGED
@@ -35,8 +35,18 @@ if st.button("Predict Top 20 Choices"):
35
  st.warning("No predictions returned.")
36
  else:
37
  df = pd.DataFrame(data)
38
- df.index = df.index + 1
39
- df.reset_index(inplace=True)
40
- df.rename(columns={"index": "Prediction Rank"}, inplace=True)
41
- st.write("### Top‑20 Predicted Choices")
42
- st.dataframe(df)
 
 
 
 
 
 
 
 
 
 
 
35
  st.warning("No predictions returned.")
36
  else:
37
  df = pd.DataFrame(data)
38
+
39
+ # Rename columns for clarity
40
+ df.rename(columns={
41
+ "Rank": "Prediction Rank",
42
+ "choice_code": "Choice Code",
43
+ "college_name": "College Name"
44
+ }, inplace=True)
45
+
46
+ # Display table without index and full width
47
+ st.write("### 🎯 Top‑20 Predicted Choices")
48
+ st.dataframe(
49
+ df.style.hide(axis="index"),
50
+ use_container_width=True
51
+ )
52
+