Emmanuel Frimpong Asante commited on
Commit
d24eed5
·
1 Parent(s): 454a4a7

"Update space"

Browse files

Signed-off-by: Emmanuel Frimpong Asante <[email protected]>

Files changed (1) hide show
  1. app.py +2 -2
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 with automatic device allocation
21
  llama_model = AutoModelForCausalLM.from_pretrained(
22
  'meta-llama/Meta-Llama-3-8B-Instruct',
23
- device_map="auto" # Automatically allocate the model to the available devices
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