Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import gradio as gr
|
|
3 |
import os, torch
|
4 |
from datasets import load_dataset
|
5 |
from huggingface_hub import HfApi, login
|
6 |
-
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
|
7 |
|
8 |
hf_profile = "bstraehle"
|
9 |
|
@@ -40,8 +40,8 @@ def fine_tune_model(base_model_id, dataset):
|
|
40 |
|
41 |
# Load pre-trained model and tokenizer
|
42 |
model_name = "meta-llama/Meta-Llama-3.1-8B-Instruct"
|
43 |
-
model =
|
44 |
-
tokenizer =
|
45 |
|
46 |
dataset = dataset.map(preprocess, batched=True)
|
47 |
|
|
|
3 |
import os, torch
|
4 |
from datasets import load_dataset
|
5 |
from huggingface_hub import HfApi, login
|
6 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
|
7 |
|
8 |
hf_profile = "bstraehle"
|
9 |
|
|
|
40 |
|
41 |
# Load pre-trained model and tokenizer
|
42 |
model_name = "meta-llama/Meta-Llama-3.1-8B-Instruct"
|
43 |
+
model = AutoModelForCausalLM.from_pretrained(model_name)
|
44 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
45 |
|
46 |
dataset = dataset.map(preprocess, batched=True)
|
47 |
|