Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import os, torch
|
|
5 |
from datasets import load_dataset
|
6 |
from huggingface_hub import HfApi, login
|
7 |
from peft import LoraConfig, TaskType, get_peft_model
|
8 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer, Seq2SeqTrainer, Seq2SeqTrainingArguments,
|
9 |
|
10 |
ACTION_1 = "Prompt base model"
|
11 |
ACTION_2 = "Fine-tune base model"
|
@@ -111,7 +111,7 @@ def fine_tune_model(base_model_name, dataset_name):
|
|
111 |
|
112 |
# Create trainer
|
113 |
|
114 |
-
trainer =
|
115 |
model=peft_model,
|
116 |
args=training_args,
|
117 |
train_dataset=train_dataset,
|
|
|
5 |
from datasets import load_dataset
|
6 |
from huggingface_hub import HfApi, login
|
7 |
from peft import LoraConfig, TaskType, get_peft_model
|
8 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer, Seq2SeqTrainer, Seq2SeqTrainingArguments, pipeline
|
9 |
|
10 |
ACTION_1 = "Prompt base model"
|
11 |
ACTION_2 = "Fine-tune base model"
|
|
|
111 |
|
112 |
# Create trainer
|
113 |
|
114 |
+
trainer = Seq2SeqTrainer(
|
115 |
model=peft_model,
|
116 |
args=training_args,
|
117 |
train_dataset=train_dataset,
|