datakomarov commited on
Commit
58c57fb
·
verified ·
1 Parent(s): bbbe055

GOLD PATH

Browse files
Files changed (1) hide show
  1. src/envs.py +9 -1
src/envs.py CHANGED
@@ -8,7 +8,15 @@ XAI_API_KEY = os.getenv("XAI_API_KEY")
8
 
9
  CORPUS_PATH = "data/5/corpus.jsonl"
10
  QUESTIONS_PATH = "data/5/questions_public.jsonl"
11
- GOLD_PATH = "secret/5/answers_gold.jsonl"
 
 
 
 
 
 
 
 
12
 
13
  def load_jsonl(path):
14
  return [json.loads(l) for l in open(path, encoding="utf-8")]
 
8
 
9
  CORPUS_PATH = "data/5/corpus.jsonl"
10
  QUESTIONS_PATH = "data/5/questions_public.jsonl"
11
+ # GOLD_PATH = "secret/5/answers_gold.jsonl"
12
+
13
+ from huggingface_hub import hf_hub_download
14
+
15
+ HF_TOKEN = os.getenv("HF_TOKEN")
16
+
17
+ # Download from a dataset
18
+
19
+ GOLD_PATH = hf_hub_download(repo_id="datakomarov/RAG-data", filename="answers_gold_5.jsonl", repo_type="dataset", token=HF_TOKEN, local_dir=".")
20
 
21
  def load_jsonl(path):
22
  return [json.loads(l) for l in open(path, encoding="utf-8")]