HLMCC commited on
Commit
5da9bab
·
verified ·
1 Parent(s): 406da08

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -64,7 +64,7 @@ if submit_button and uploaded_file:
64
  predictions = pd.read_csv(uploaded_file)
65
 
66
  # Check if file format is correct
67
- if "patient_id" in predictions.columns and "predicted_survival_time" in predictions.columns:
68
  # Merge with ground truth to calculate C-Index
69
  merged = pd.merge(ground_truth, predictions, on="patient_id", how="inner")
70
  c_index = concordance_index(event_times=merged["survival_time"],
@@ -99,7 +99,7 @@ if submit_button and uploaded_file:
99
  # Display the calculated C-Index to the user
100
  st.success(f"Submission received! Your C-Index score: {c_index:.4f}")
101
  else:
102
- st.error("Incorrect file format. Ensure columns include 'patient_id' and 'predicted_survival_time'.")
103
 
104
  # Display the leaderboard
105
  st.subheader("Leaderboard")
 
64
  predictions = pd.read_csv(uploaded_file)
65
 
66
  # Check if file format is correct
67
+ if "patient_id" in predictions.columns and "predicted_scores" in predictions.columns:
68
  # Merge with ground truth to calculate C-Index
69
  merged = pd.merge(ground_truth, predictions, on="patient_id", how="inner")
70
  c_index = concordance_index(event_times=merged["survival_time"],
 
99
  # Display the calculated C-Index to the user
100
  st.success(f"Submission received! Your C-Index score: {c_index:.4f}")
101
  else:
102
+ st.error("Incorrect file format. Ensure columns include 'patient_id' and 'predicted_scores'.")
103
 
104
  # Display the leaderboard
105
  st.subheader("Leaderboard")