Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -19,9 +19,12 @@ from constants import CHROMA_SETTINGS
|
|
19 |
st.set_page_config(layout="centered")
|
20 |
|
21 |
checkpoint = "meta-llama/Llama-2-7b-chat-hf"
|
22 |
-
|
|
|
|
|
23 |
model = AutoModelForCausalLM.from_pretrained(
|
24 |
-
checkpoint,
|
|
|
25 |
device_map="auto",
|
26 |
torch_dtype=torch.float32
|
27 |
)
|
|
|
19 |
st.set_page_config(layout="centered")
|
20 |
|
21 |
checkpoint = "meta-llama/Llama-2-7b-chat-hf"
|
22 |
+
token = os.getenv("HF_TOKEN")
|
23 |
+
|
24 |
+
tokenizer = AutoTokenizer.from_pretrained(checkpoint, use_auth_token=token)
|
25 |
model = AutoModelForCausalLM.from_pretrained(
|
26 |
+
checkpoint,
|
27 |
+
use_auth_token=token,
|
28 |
device_map="auto",
|
29 |
torch_dtype=torch.float32
|
30 |
)
|