rasyosef commited on
Commit
b92d174
·
verified ·
1 Parent(s): 443b8e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -10,7 +10,7 @@ tokenizer = AutoTokenizer.from_pretrained(model_id)
10
  model = AutoModelForCausalLM.from_pretrained(
11
  model_id,
12
  torch_dtype=torch.float32,
13
- device="cuda" if torch.cuda.is_available() else "cpu"
14
  )
15
 
16
  llama3_am = pipeline(
@@ -18,7 +18,7 @@ llama3_am = pipeline(
18
  model=model,
19
  tokenizer=tokenizer,
20
  eos_token_id=tokenizer.eos_token_id,
21
- device="cuda" if torch.cuda.is_available() else "cpu"
22
  )
23
 
24
  # Function that accepts a prompt and generates text
 
10
  model = AutoModelForCausalLM.from_pretrained(
11
  model_id,
12
  torch_dtype=torch.float32,
13
+ # device_map="cuda" if torch.cuda.is_available() else "cpu"
14
  )
15
 
16
  llama3_am = pipeline(
 
18
  model=model,
19
  tokenizer=tokenizer,
20
  eos_token_id=tokenizer.eos_token_id,
21
+ # device_map="cuda" if torch.cuda.is_available() else "cpu"
22
  )
23
 
24
  # Function that accepts a prompt and generates text