as-cle-bert commited on
Commit
c5ee464
1 Parent(s): e4c543a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -39,7 +39,7 @@ def modelA_button():
39
  df = pd.read_csv("models.csv")
40
  df.loc[df["MODEL"] == choice["ModelA"], "MATCHES_WON"] += 1
41
  df.loc[df["MODEL"] == choice["ModelA"], "WINNING_RATE"] = df.loc[df["MODEL"] == choice["ModelA"], "MATCHES_WON"]/df.loc[df["MODEL"] == choice["ModelA"], "MATCHES_PLAYED"]
42
- df.to_csv("models.csv")
43
  rewrite_csv_ordered_by_winning_rate("models.csv")
44
 
45
  def modelB_button():
@@ -47,7 +47,7 @@ def modelB_button():
47
  df = pd.read_csv("models.csv")
48
  df.loc[df["MODEL"] == choice["ModelB"], "MATCHES_WON"] += 1
49
  df.loc[df["MODEL"] == choice["ModelB"], "WINNING_RATE"] = df.loc[df["MODEL"] == choice["ModelB"], "MATCHES_WON"]/df.loc[df["MODEL"] == choice["ModelB"], "MATCHES_PLAYED"]
50
- df.to_csv("models.csv")
51
  rewrite_csv_ordered_by_winning_rate("models.csv")
52
 
53
  import time
 
39
  df = pd.read_csv("models.csv")
40
  df.loc[df["MODEL"] == choice["ModelA"], "MATCHES_WON"] += 1
41
  df.loc[df["MODEL"] == choice["ModelA"], "WINNING_RATE"] = df.loc[df["MODEL"] == choice["ModelA"], "MATCHES_WON"]/df.loc[df["MODEL"] == choice["ModelA"], "MATCHES_PLAYED"]
42
+ df.to_csv("models.csv", index=False)
43
  rewrite_csv_ordered_by_winning_rate("models.csv")
44
 
45
  def modelB_button():
 
47
  df = pd.read_csv("models.csv")
48
  df.loc[df["MODEL"] == choice["ModelB"], "MATCHES_WON"] += 1
49
  df.loc[df["MODEL"] == choice["ModelB"], "WINNING_RATE"] = df.loc[df["MODEL"] == choice["ModelB"], "MATCHES_WON"]/df.loc[df["MODEL"] == choice["ModelB"], "MATCHES_PLAYED"]
50
+ df.to_csv("models.csv", index=False)
51
  rewrite_csv_ordered_by_winning_rate("models.csv")
52
 
53
  import time