Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 "
|
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 '
|
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")
|