aibota01 commited on
Commit
ba59c03
·
1 Parent(s): 2854624

Move ground truth to hidden folder

Browse files
Files changed (2) hide show
  1. .private/ground_truth.csv +0 -0
  2. app.py +11 -2
.private/ground_truth.csv DELETED
The diff for this file is too large to render. See raw diff
 
app.py CHANGED
@@ -2,7 +2,9 @@ import gradio as gr
2
  import pandas as pd
3
  import os
4
  from apscheduler.schedulers.background import BackgroundScheduler
5
- from sklearn.metrics import mean_absolute_error # Import MAE function
 
 
6
 
7
  # ---------- Evaluation Functions ----------
8
 
@@ -47,7 +49,14 @@ def evaluate_submission(file, submission_name, model_description):
47
 
48
  # Load hidden ground truth CSV.
49
  try:
50
- gt_df = pd.read_csv(".private/ground_truth.csv")
 
 
 
 
 
 
 
51
  except Exception as e:
52
  return "Error loading ground truth file: " + str(e)
53
 
 
2
  import pandas as pd
3
  import os
4
  from apscheduler.schedulers.background import BackgroundScheduler
5
+ from sklearn.metrics import mean_absolute_error
6
+ from huggingface_hub import hf_hub_download
7
+
8
 
9
  # ---------- Evaluation Functions ----------
10
 
 
49
 
50
  # Load hidden ground truth CSV.
51
  try:
52
+ #gt_df = pd.read_csv(".private/ground_truth.csv")
53
+ gt_path = hf_hub_download(
54
+ repo_id="issai/ground-truth-food-eval",
55
+ filename="ground_truth.csv",
56
+ repo_type="dataset",
57
+ token=True # This ensures your private access token is used
58
+ )
59
+ gt_df = pd.read_csv(gt_path)
60
  except Exception as e:
61
  return "Error loading ground truth file: " + str(e)
62