kpbotla commited on
Commit
439d08d
·
verified ·
1 Parent(s): 794ac58

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -25,6 +25,7 @@ COURSE_TITLE = os.getenv("COURSE_TITLE", "Hugging Face Agents Course")
25
  def check_user_score(username):
26
  score_data = load_dataset(SCORES_DATASET, split="train", download_mode="force_redownload")
27
  matches = [row for row in score_data if row["username"] == username]
 
28
  return matches[0] if matches else None
29
 
30
  # Function to check if certificate entry exists
@@ -51,7 +52,7 @@ def add_certificate_entry(username, name, score):
51
 
52
  # Rebuild dataset and push
53
  updated_ds = Dataset.from_list(filtered_rows)
54
- updated_ds.push_to_hub(CERTIFICATES_DATASET)
55
 
56
  # Function to generate certificate PDF
57
  def generate_certificate(name, score):
 
25
  def check_user_score(username):
26
  score_data = load_dataset(SCORES_DATASET, split="train", download_mode="force_redownload")
27
  matches = [row for row in score_data if row["username"] == username]
28
+ print(score_data)
29
  return matches[0] if matches else None
30
 
31
  # Function to check if certificate entry exists
 
52
 
53
  # Rebuild dataset and push
54
  updated_ds = Dataset.from_list(filtered_rows)
55
+ #updated_ds.push_to_hub(CERTIFICATES_DATASET)
56
 
57
  # Function to generate certificate PDF
58
  def generate_certificate(name, score):