Andreas Varvarigos commited on
Commit
0d79cb0
·
verified ·
1 Parent(s): ae4782f

Update src/litbench_pipeline.py

Browse files
Files changed (1) hide show
  1. src/litbench_pipeline.py +6 -1
src/litbench_pipeline.py CHANGED
@@ -32,8 +32,13 @@ import time
32
  import torch
33
  from peft.peft_model import PeftModel
34
  from datasets import load_dataset
 
35
 
36
-
 
 
 
 
37
 
38
  # Function to determine the chatbot's first message based on user choices
39
  def setup(download_option, train_option):
 
32
  import torch
33
  from peft.peft_model import PeftModel
34
  from datasets import load_dataset
35
+ from huggingface_hub import login
36
 
37
+ # Load token from Hugging Face Secrets
38
+ HF_TOKEN = os.getenv("HF_TOKEN")
39
+ # Login using the token (only needed if loading private models)
40
+ if HF_TOKEN:
41
+ login(HF_TOKEN)
42
 
43
  # Function to determine the chatbot's first message based on user choices
44
  def setup(download_option, train_option):