Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -45,8 +45,11 @@ def load_model(model_name):
|
|
| 45 |
# Load model directly
|
| 46 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 47 |
|
| 48 |
-
|
| 49 |
-
|
|
|
|
|
|
|
|
|
|
| 50 |
# Initialize Hugging Face LLM
|
| 51 |
system_prompt = """# You are a Q&A assistant. Your goal is to answer questions as
|
| 52 |
accurately as possible based on the instructions and context provided
|
|
|
|
| 45 |
# Load model directly
|
| 46 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 47 |
|
| 48 |
+
# Load model directly
|
| 49 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 50 |
+
|
| 51 |
+
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Meta-Llama-3-8B")
|
| 52 |
+
model = AutoModelForCausalLM.from_pretrained("meta-llama/Meta-Llama-3-8B")
|
| 53 |
# Initialize Hugging Face LLM
|
| 54 |
system_prompt = """# You are a Q&A assistant. Your goal is to answer questions as
|
| 55 |
accurately as possible based on the instructions and context provided
|