Spaces:
Runtime error
Runtime error
LovnishVerma
commited on
Commit
•
f235b5d
1
Parent(s):
86d0067
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,11 @@
|
|
1 |
-
from transformers import
|
2 |
|
3 |
model_name = "mlabonne/llama-2-7b-guanaco"
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
|
|
|
|
|
|
|
1 |
+
from transformers import LlamaForCausalLM, LlamaTokenizer
|
2 |
|
3 |
model_name = "mlabonne/llama-2-7b-guanaco"
|
4 |
|
5 |
+
# Load the model
|
6 |
+
model = LlamaForCausalLM.from_pretrained(model_name)
|
7 |
+
|
8 |
+
# Load the tokenizer
|
9 |
+
tokenizer = LlamaTokenizer.from_pretrained(model_name)
|
10 |
+
|
11 |
+
# Now, you can use the model and tokenizer as needed
|