Spaces:
Paused
Paused
Update app.py
Browse files
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
|