bstraehle commited on
Commit
1f5f48f
1 Parent(s): 3a5ed7f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -6,6 +6,7 @@ import evaluate
6
  import numpy as np
7
  import random
8
  import huggingface_hub
 
9
  from datasets import Dataset, DatasetDict, load_dataset
10
  from peft import LoraConfig, PeftModel, prepare_model_for_kbit_training, get_peft_model
11
  from transformers import (AutoTokenizer, BitsAndBytesConfig, TrainingArguments, AutoModelForSequenceClassification, Trainer, EarlyStoppingCallback, DataCollatorWithPadding)
@@ -46,7 +47,7 @@ def process(model_id, dataset):
46
 
47
  #Step 5: Fine-tune the model
48
 
49
- huggingface_hub.login()
50
 
51
  model_id = model_id
52
  model = AutoModelForSequenceClassification.from_pretrained(model_id)
 
6
  import numpy as np
7
  import random
8
  import huggingface_hub
9
+ import os
10
  from datasets import Dataset, DatasetDict, load_dataset
11
  from peft import LoraConfig, PeftModel, prepare_model_for_kbit_training, get_peft_model
12
  from transformers import (AutoTokenizer, BitsAndBytesConfig, TrainingArguments, AutoModelForSequenceClassification, Trainer, EarlyStoppingCallback, DataCollatorWithPadding)
 
47
 
48
  #Step 5: Fine-tune the model
49
 
50
+ huggingface_hub.login(os.environ["OPENAI_API_KEY"])
51
 
52
  model_id = model_id
53
  model = AutoModelForSequenceClassification.from_pretrained(model_id)