SondosMB commited on
Commit
b0b8450
·
verified ·
1 Parent(s): 3c502d4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -174,12 +174,12 @@ def initialize_leaderboard_file():
174
  if not os.path.exists(LEADERBOARD_FILE):
175
  pd.DataFrame(columns=[
176
  "Model Name", "Overall Accuracy", "Correct Predictions",
177
- "Total Questions", "Timestamp"
178
  ]).to_csv(LEADERBOARD_FILE, index=False)
179
  elif os.stat(LEADERBOARD_FILE).st_size == 0:
180
  pd.DataFrame(columns=[
181
  "Model Name", "Overall Accuracy", "Correct Predictions",
182
- "Total Questions", "Timestamp"
183
  ]).to_csv(LEADERBOARD_FILE, index=False)
184
 
185
  def clean_answer(answer):
@@ -242,6 +242,7 @@ def update_leaderboard(results):
242
  "Correct Predictions": results['correct_predictions'],
243
  "Total Questions": results['total_questions'],
244
  "Timestamp": datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
 
245
  }
246
 
247
  try:
@@ -297,6 +298,8 @@ def load_leaderboard():
297
  "Correct Predictions": [],
298
  "Total Questions": [],
299
  "Timestamp": [],
 
 
300
  })
301
  return pd.read_csv(LEADERBOARD_FILE)
302
 
 
174
  if not os.path.exists(LEADERBOARD_FILE):
175
  pd.DataFrame(columns=[
176
  "Model Name", "Overall Accuracy", "Correct Predictions",
177
+ "Total Questions", "Timestamp", "Team Name"
178
  ]).to_csv(LEADERBOARD_FILE, index=False)
179
  elif os.stat(LEADERBOARD_FILE).st_size == 0:
180
  pd.DataFrame(columns=[
181
  "Model Name", "Overall Accuracy", "Correct Predictions",
182
+ "Total Questions", "Timestamp", "Team Name"
183
  ]).to_csv(LEADERBOARD_FILE, index=False)
184
 
185
  def clean_answer(answer):
 
242
  "Correct Predictions": results['correct_predictions'],
243
  "Total Questions": results['total_questions'],
244
  "Timestamp": datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
245
+ "Team Name": results['Team_name'],
246
  }
247
 
248
  try:
 
298
  "Correct Predictions": [],
299
  "Total Questions": [],
300
  "Timestamp": [],
301
+ "Team Name": [],
302
+
303
  })
304
  return pd.read_csv(LEADERBOARD_FILE)
305