truongghieu commited on
Commit
212571c
1 Parent(s): 505ed55

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -16,9 +16,9 @@ bnb_config = BitsAndBytesConfig(
16
 
17
  tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
18
  # Load model in this way if use GPU
19
- if device == "cuda":
20
  model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True, quantization_config=bnb_config)
21
- elif(device == "cpu")
22
  model = AutoModelForCausalLM.from_pretrained("truongghieu/deci-finetuned", trust_remote_code=True)
23
  # Move the model to the GPU if available
24
 
 
16
 
17
  tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
18
  # Load model in this way if use GPU
19
+ if (device == "cuda"):
20
  model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True, quantization_config=bnb_config)
21
+ elif(device == "cpu"):
22
  model = AutoModelForCausalLM.from_pretrained("truongghieu/deci-finetuned", trust_remote_code=True)
23
  # Move the model to the GPU if available
24