Emmanuel Frimpong Asante
commited on
Commit
·
d24eed5
1
Parent(s):
454a4a7
"Update space"
Browse filesSigned-off-by: Emmanuel Frimpong Asante <[email protected]>
app.py
CHANGED
@@ -17,10 +17,10 @@ auth_model = load_model('models/auth_model.h5', compile=True)
|
|
17 |
# Initialize the tokenizer
|
18 |
llama_tokenizer = AutoTokenizer.from_pretrained('meta-llama/Meta-Llama-3-8B-Instruct')
|
19 |
|
20 |
-
# Initialize the LLaMA model
|
21 |
llama_model = AutoModelForCausalLM.from_pretrained(
|
22 |
'meta-llama/Meta-Llama-3-8B-Instruct',
|
23 |
-
device_map="
|
24 |
)
|
25 |
|
26 |
# Dictionaries for disease names, results, and recommendations
|
|
|
17 |
# Initialize the tokenizer
|
18 |
llama_tokenizer = AutoTokenizer.from_pretrained('meta-llama/Meta-Llama-3-8B-Instruct')
|
19 |
|
20 |
+
# Initialize the LLaMA model and force CPU usage
|
21 |
llama_model = AutoModelForCausalLM.from_pretrained(
|
22 |
'meta-llama/Meta-Llama-3-8B-Instruct',
|
23 |
+
device_map={"": "cpu"} # Force the model to load on the CPU
|
24 |
)
|
25 |
|
26 |
# Dictionaries for disease names, results, and recommendations
|