Spaces:
Runtime error
Runtime error
Commit
•
7f08f65
1
Parent(s):
40d0401
Update llama_chat_bot.py
Browse files- llama_chat_bot.py +5 -0
llama_chat_bot.py
CHANGED
@@ -12,16 +12,21 @@ Original file is located at
|
|
12 |
|
13 |
import transformers
|
14 |
import os
|
|
|
15 |
|
16 |
hf_token=os.environ['HF_READ_TOKEN']
|
17 |
print(hf_token)
|
18 |
|
|
|
|
|
19 |
|
20 |
from transformers import AutoTokenizer
|
21 |
|
22 |
model = "meta-llama/Llama-2-7b-chat-hf"
|
23 |
tokenizer = AutoTokenizer.from_pretrained(model, token=hf_token)
|
24 |
|
|
|
|
|
25 |
# pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
|
26 |
|
27 |
from transformers import pipeline
|
|
|
12 |
|
13 |
import transformers
|
14 |
import os
|
15 |
+
import huggingface_hub
|
16 |
|
17 |
hf_token=os.environ['HF_READ_TOKEN']
|
18 |
print(hf_token)
|
19 |
|
20 |
+
huggingface-cli login --token $HF_READ_TOKEN
|
21 |
+
|
22 |
|
23 |
from transformers import AutoTokenizer
|
24 |
|
25 |
model = "meta-llama/Llama-2-7b-chat-hf"
|
26 |
tokenizer = AutoTokenizer.from_pretrained(model, token=hf_token)
|
27 |
|
28 |
+
# tokenizer = AutoTokenizer.from_pretrained(model, token=hf_token)
|
29 |
+
|
30 |
# pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
|
31 |
|
32 |
from transformers import pipeline
|