Benson commited on
Commit
32e14fa
·
1 Parent(s): 26099c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -5,7 +5,8 @@ import torch
5
  # Create a new FastAPI app instance
6
  app = FastAPI(docs_url="/")
7
 
8
- gpu = torch.device("cuda")
 
9
 
10
 
11
  # Initialize the text generation pipeline
 
5
  # Create a new FastAPI app instance
6
  app = FastAPI(docs_url="/")
7
 
8
+ #gpu = torch.device("cuda")
9
+ gpu = 0 if torch.cuda.is_available() else -1
10
 
11
 
12
  # Initialize the text generation pipeline