daoqm123 commited on
Commit
bbe2159
·
verified ·
1 Parent(s): 7dd8383

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +9 -1
main.py CHANGED
@@ -16,6 +16,7 @@ import random
16
  from transformers import AutoTokenizer, AutoModelForSequenceClassification
17
  from collections import defaultdict
18
  from pathlib import Path
 
19
 
20
  # Global model and tokenizer
21
  model = None
@@ -204,7 +205,14 @@ def load_dataset():
204
 
205
 
206
 
207
- dataset_path = Path("xlam_function_calling_60k_processed_with_ground_truth.json")
 
 
 
 
 
 
 
208
 
209
  if not dataset_path:
210
  print("Warning: Dataset file not found. Using hardcoded examples.")
 
16
  from transformers import AutoTokenizer, AutoModelForSequenceClassification
17
  from collections import defaultdict
18
  from pathlib import Path
19
+ from huggingface_hub import hf_hub_download
20
 
21
  # Global model and tokenizer
22
  model = None
 
205
 
206
 
207
 
208
+ DATASET_FILE = "xlam_function_calling_60k_processed_with_ground_truth.json"
209
+ dataset_path = Path(
210
+ hf_hub_download(
211
+ repo_type="space",
212
+ repo_id="daoqm123/llm-error-classifier-api",
213
+ filename=DATASET_FILE,
214
+ )
215
+ )
216
 
217
  if not dataset_path:
218
  print("Warning: Dataset file not found. Using hardcoded examples.")