Update app.py
Browse files
app.py
CHANGED
@@ -3,18 +3,19 @@ import pandas as pd
|
|
3 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
4 |
import torch
|
5 |
|
6 |
-
#
|
7 |
model_name = "meta-llama/Meta-Llama-3.1-8B"
|
8 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
9 |
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float16, device_map="auto")
|
10 |
|
|
|
11 |
from huggingface_hub import login
|
12 |
import os
|
13 |
|
14 |
-
# ํ๊ฒฝ ๋ณ์์์ ํ ํฐ์
|
15 |
-
hf_token = os.environ.get("
|
16 |
|
17 |
-
# ํ ํฐ์ ์ฌ์ฉํ์ฌ
|
18 |
if hf_token:
|
19 |
login(token=hf_token)
|
20 |
else:
|
|
|
3 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
4 |
import torch
|
5 |
|
6 |
+
# model, tokenizer ์
ํ
|
7 |
model_name = "meta-llama/Meta-Llama-3.1-8B"
|
8 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
9 |
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float16, device_map="auto")
|
10 |
|
11 |
+
#hugging face ๋ก๊ทธ์ธ (ํ ํฐ ๊ฐ์ ธ์ค๊ธฐ ์ํด์)
|
12 |
from huggingface_hub import login
|
13 |
import os
|
14 |
|
15 |
+
# ํ๊ฒฝ ๋ณ์์์ ํ ํฐ์ ๊ฐ์ ธ์ค๊ธฐ
|
16 |
+
hf_token = os.environ.get("llama3.31-8b-token-new")
|
17 |
|
18 |
+
# ํ ํฐ์ ์ฌ์ฉํ์ฌ ๋ก๊ทธ์ธ
|
19 |
if hf_token:
|
20 |
login(token=hf_token)
|
21 |
else:
|