Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ tokenizer = AutoTokenizer.from_pretrained(model_id)
|
|
10 |
model = AutoModelForCausalLM.from_pretrained(
|
11 |
model_id,
|
12 |
torch_dtype=torch.float32,
|
13 |
-
|
14 |
)
|
15 |
|
16 |
llama3_am = pipeline(
|
@@ -18,7 +18,7 @@ llama3_am = pipeline(
|
|
18 |
model=model,
|
19 |
tokenizer=tokenizer,
|
20 |
eos_token_id=tokenizer.eos_token_id,
|
21 |
-
|
22 |
)
|
23 |
|
24 |
# Function that accepts a prompt and generates text
|
|
|
10 |
model = AutoModelForCausalLM.from_pretrained(
|
11 |
model_id,
|
12 |
torch_dtype=torch.float32,
|
13 |
+
# device_map="cuda" if torch.cuda.is_available() else "cpu"
|
14 |
)
|
15 |
|
16 |
llama3_am = pipeline(
|
|
|
18 |
model=model,
|
19 |
tokenizer=tokenizer,
|
20 |
eos_token_id=tokenizer.eos_token_id,
|
21 |
+
# device_map="cuda" if torch.cuda.is_available() else "cpu"
|
22 |
)
|
23 |
|
24 |
# Function that accepts a prompt and generates text
|