truongghieu commited on
Commit
505ed55
1 Parent(s): 84de4b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -18,7 +18,7 @@ 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
- else:
22
  model = AutoModelForCausalLM.from_pretrained("truongghieu/deci-finetuned", trust_remote_code=True)
23
  # Move the model to the GPU if available
24
 
 
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