Spaces:
Sleeping
Sleeping
Commit
·
9cfd209
1
Parent(s):
28324bf
added device support
Browse files
app.py
CHANGED
@@ -5,8 +5,8 @@ from transformers import pipeline
|
|
5 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
6 |
print(f"Using device: {device}")
|
7 |
model_name = "eljanmahammadli/AzLlama-152M-Alpaca"
|
8 |
-
model = pipeline(
|
9 |
-
device=device
|
10 |
)
|
11 |
logo_path = "AzLlama-logo.webp"
|
12 |
|
|
|
5 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
6 |
print(f"Using device: {device}")
|
7 |
model_name = "eljanmahammadli/AzLlama-152M-Alpaca"
|
8 |
+
model = pipeline(
|
9 |
+
"text-generation", model=model_name, torch_dtype=torch.float16, device=device
|
10 |
)
|
11 |
logo_path = "AzLlama-logo.webp"
|
12 |
|