yuntian-deng commited on
Commit
0552781
1 Parent(s): 5c05a33

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -16,6 +16,8 @@ explicit_cot_model = AutoModelForCausalLM.from_pretrained(explicit_cot_model_nam
16
 
17
  models = {'implicit': implicit_cot_model, 'no': no_cot_model, 'explicit': explicit_cot_model}
18
 
 
 
19
  # Constants
20
  MAX_PRODUCT_DIGITS_PER_MODEL = {'implicit': 100, 'no': 100, 'explicit': 960}
21
 
 
16
 
17
  models = {'implicit': implicit_cot_model, 'no': no_cot_model, 'explicit': explicit_cot_model}
18
 
19
+ [model.to('cuda' if torch.cuda.is_available() else 'cpu') for model in models.values()]
20
+
21
  # Constants
22
  MAX_PRODUCT_DIGITS_PER_MODEL = {'implicit': 100, 'no': 100, 'explicit': 960}
23