Spaces:
Sleeping
Sleeping
aixsatoshi
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ device = "auto"
|
|
10 |
model_id = "ibm-granite/granite-3.0-8b-instruct"
|
11 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
12 |
# drop device_map if running on CPU
|
13 |
-
model = AutoModelForCausalLM.from_pretrained(
|
14 |
model.eval()
|
15 |
# change input text as desired
|
16 |
|
|
|
10 |
model_id = "ibm-granite/granite-3.0-8b-instruct"
|
11 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
12 |
# drop device_map if running on CPU
|
13 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, device_map=device)
|
14 |
model.eval()
|
15 |
# change input text as desired
|
16 |
|