Spaces:
Runtime error
Runtime error
Mikhil-jivus
commited on
Commit
•
fdb6001
1
Parent(s):
7e7821b
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ MAX_MAX_NEW_TOKENS = 6144
|
|
27 |
DEFAULT_MAX_NEW_TOKENS = 6144
|
28 |
MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "6144"))
|
29 |
|
30 |
-
device = torch.device("
|
31 |
|
32 |
#model_id = "nltpt/Llama-3.2-3B-Instruct"
|
33 |
tokenizer = AutoTokenizer.from_pretrained(model_id,token=access_token)
|
|
|
27 |
DEFAULT_MAX_NEW_TOKENS = 6144
|
28 |
MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "6144"))
|
29 |
|
30 |
+
device = torch.device("auto" if torch.cuda.is_available() else "cpu")
|
31 |
|
32 |
#model_id = "nltpt/Llama-3.2-3B-Instruct"
|
33 |
tokenizer = AutoTokenizer.from_pretrained(model_id,token=access_token)
|