elfsong commited on
Commit
2b83ad7
Β·
1 Parent(s): ae32083
Files changed (1) hide show
  1. app.py +13 -4
app.py CHANGED
@@ -59,10 +59,19 @@ with st.spinner(f'Chair is crafting a motion...'):
59
 
60
  # Vote
61
  st.header("Vote")
 
62
  for member in committee.members:
63
  with st.spinner(f'Member who concerns **{member.bias_type}** is voting...'):
64
  vote_result = member.vote(motion, instance)
65
- st.subheader(f"Member who concerns **{member.bias_type}** votes:")
66
- st.markdown(vote_result)
67
-
68
- st.balloons
 
 
 
 
 
 
 
 
 
59
 
60
  # Vote
61
  st.header("Vote")
62
+ vote_results = list()
63
  for member in committee.members:
64
  with st.spinner(f'Member who concerns **{member.bias_type}** is voting...'):
65
  vote_result = member.vote(motion, instance)
66
+ vote_results += [True ifvote_result['decision'] != "Veto" else False]
67
+ vote_map = {
68
+ "Pass": "Pass βœ…",
69
+ "Veto": "Veto 🚫",
70
+ "Abstain": "Abstain 😴"
71
+ }
72
+ st.subheader(f"Member who concerns **{member.bias_type}** votes: {vote_map[vote_result['decision']]}")
73
+
74
+ # Final Decision
75
+ st.header("Final Decision")
76
+ st.text(f'Given the voting result, the motion has been' + "Passed" if all(vote_results) else "Rejected" + "!")
77
+ st.balloons()