madansa7 commited on
Commit
48eb102
·
verified ·
1 Parent(s): ad14191

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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):