Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
-
from transformers import
|
| 2 |
|
| 3 |
# Load pre-trained model and tokenizer
|
| 4 |
-
model_name = "codellama/CodeLlama-7b-hf"
|
| 5 |
-
tokenizer =
|
| 6 |
-
model =
|
| 7 |
|
| 8 |
# System message
|
| 9 |
system_message = "You are a code teaching assistant named OmniCode created by Anusha K. Answer all the code related questions being asked."
|
|
|
|
| 1 |
+
from transformers import CodeLlamaForConditionalGeneration, CodeLlamaTokenizer
|
| 2 |
|
| 3 |
# Load pre-trained model and tokenizer
|
| 4 |
+
model_name = "codellama/CodeLlama-7b-hf" # Assuming your CodeLlama model name
|
| 5 |
+
tokenizer = CodeLlamaTokenizer.from_pretrained(model_name)
|
| 6 |
+
model = CodeLlamaForConditionalGeneration.from_pretrained(model_name)
|
| 7 |
|
| 8 |
# System message
|
| 9 |
system_message = "You are a code teaching assistant named OmniCode created by Anusha K. Answer all the code related questions being asked."
|