chobob311 commited on
Commit
0e72116
โ€ข
1 Parent(s): 5115ed3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import gradio as gr
2
- from transformers import LlamaTokenizer, LlamaForCausalLM
3
  import torch
4
- import os # os ๋ชจ๋“ˆ ์ž„ํฌํŠธ
5
 
6
  model_id = 'Bllossom/llama-3.2-Korean-Bllossom-3B'
7
 
@@ -9,11 +9,11 @@ model_id = 'Bllossom/llama-3.2-Korean-Bllossom-3B'
9
  hf_access_token = os.getenv('HUGGINGFACEHUB_API_TOKEN')
10
 
11
  # ํ† ํฌ๋‚˜์ด์ €์™€ ๋ชจ๋ธ ๋กœ๋“œ
12
- tokenizer = LlamaTokenizer.from_pretrained(
13
  model_id,
14
  use_auth_token=hf_access_token
15
  )
16
- model = LlamaForCausalLM.from_pretrained(
17
  model_id,
18
  torch_dtype=torch.bfloat16,
19
  device_map="auto",
 
1
  import gradio as gr
2
+ from transformers import AutoTokenizer, AutoModelForCausalLM
3
  import torch
4
+ import os
5
 
6
  model_id = 'Bllossom/llama-3.2-Korean-Bllossom-3B'
7
 
 
9
  hf_access_token = os.getenv('HUGGINGFACEHUB_API_TOKEN')
10
 
11
  # ํ† ํฌ๋‚˜์ด์ €์™€ ๋ชจ๋ธ ๋กœ๋“œ
12
+ tokenizer = AutoTokenizer.from_pretrained(
13
  model_id,
14
  use_auth_token=hf_access_token
15
  )
16
+ model = AutoModelForCausalLM.from_pretrained(
17
  model_id,
18
  torch_dtype=torch.bfloat16,
19
  device_map="auto",