dwb2023 commited on
Commit
85e5da9
·
verified ·
1 Parent(s): 53d22af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -12,6 +12,9 @@ from transformers import (
12
  LlamaTokenizer,
13
  )
14
 
 
 
 
15
  MAX_MAX_NEW_TOKENS = 1024
16
  DEFAULT_MAX_NEW_TOKENS = 50
17
  MAX_INPUT_TOKEN_LENGTH = 512
 
12
  LlamaTokenizer,
13
  )
14
 
15
+
16
+ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
17
+
18
  MAX_MAX_NEW_TOKENS = 1024
19
  DEFAULT_MAX_NEW_TOKENS = 50
20
  MAX_INPUT_TOKEN_LENGTH = 512