bstraehle commited on
Commit
87a35cb
1 Parent(s): bacc03f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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, LlamaForCausalLM, LlamaTokenizer
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 = LlamaForCausalLM.from_pretrained(model_name)
44
- tokenizer = LlamaTokenizer.from_pretrained(model_name)
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