Spaces:
Running
Running
Zekun Wu
commited on
Commit
·
77bcae3
1
Parent(s):
ff53a3e
update
Browse files
app.py
CHANGED
@@ -74,22 +74,17 @@ if st.session_state.model_submitted:
|
|
74 |
st.session_state.data_processed = True # Mark as processed
|
75 |
|
76 |
# Add ranks for each score within each row
|
77 |
-
df['
|
78 |
-
|
79 |
-
|
80 |
-
df['Protect_Rank'] =
|
81 |
-
|
82 |
-
df['Neutral_Rank'] = df[['Privilege_Avg_Score', 'Protect_Avg_Score', 'Neutral_Avg_Score']].rank(axis=1)[
|
83 |
-
'Neutral_Avg_Score']
|
84 |
|
85 |
st.write('Processed Data:', df)
|
86 |
|
87 |
# use the data to generate a plot
|
88 |
st.write("Plotting the data")
|
89 |
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
test_results = statistical_tests(df)
|
94 |
print(test_results)
|
95 |
evaluation_results = result_evaluation(test_results)
|
|
|
74 |
st.session_state.data_processed = True # Mark as processed
|
75 |
|
76 |
# Add ranks for each score within each row
|
77 |
+
ranks = df[['Privilege_Avg_Score', 'Protect_Avg_Score', 'Neutral_Avg_Score']].rank(axis=1,ascending=False)
|
78 |
+
|
79 |
+
df['Privilege_Rank'] = ranks['Privilege_Avg_Score']
|
80 |
+
df['Protect_Rank'] = ranks['Protect_Avg_Score']
|
81 |
+
df['Neutral_Rank'] = ranks['Neutral_Avg_Score']
|
|
|
|
|
82 |
|
83 |
st.write('Processed Data:', df)
|
84 |
|
85 |
# use the data to generate a plot
|
86 |
st.write("Plotting the data")
|
87 |
|
|
|
|
|
|
|
88 |
test_results = statistical_tests(df)
|
89 |
print(test_results)
|
90 |
evaluation_results = result_evaluation(test_results)
|