Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from transformers import pipeline
|
|
4 |
pipe = pipeline(
|
5 |
"text-generation",
|
6 |
model="agentica-org/DeepCoder-14B-Preview",
|
7 |
-
device="cuda"
|
8 |
)
|
9 |
|
10 |
def chat(message, history):
|
|
|
4 |
pipe = pipeline(
|
5 |
"text-generation",
|
6 |
model="agentica-org/DeepCoder-14B-Preview",
|
7 |
+
device="cuda" if torch.cuda.is_available() else "cpu"
|
8 |
)
|
9 |
|
10 |
def chat(message, history):
|