Thiloid commited on
Commit
6459965
·
verified ·
1 Parent(s): b4ce61d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -82,7 +82,12 @@ if uploaded_file is not None:
82
  election=str(df["instance"].iloc[0])
83
  statements = str(df["statement"].nunique())
84
  statement_n = df["statement"].nunique()
85
- parties = str(df["party_name"].nunique())
 
 
 
 
 
86
  st.success("You have uploaded the party answers for the VOTO instance: "+election+" ("+statements+" statements; "+parties+" Parties)")
87
 
88
  expander1 = st.expander("Statement Selection")
 
82
  election=str(df["instance"].iloc[0])
83
  statements = str(df["statement"].nunique())
84
  statement_n = df["statement"].nunique()
85
+ try:
86
+ parties = str(df["party_name"].nunique())
87
+ except KeyError:
88
+ parties = str(df["party"].nunique())
89
+ df["party_name"] = df["party"]
90
+
91
  st.success("You have uploaded the party answers for the VOTO instance: "+election+" ("+statements+" statements; "+parties+" Parties)")
92
 
93
  expander1 = st.expander("Statement Selection")