Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -34,8 +34,7 @@ if next(model.parameters()).is_cuda:
|
|
34 |
else:
|
35 |
print("The model is on a CPU")
|
36 |
|
37 |
-
|
38 |
-
if text_generator.model.is_cuda:
|
39 |
print("The pipeline is using a GPU")
|
40 |
else:
|
41 |
print("The pipeline is using a CPU")
|
|
|
34 |
else:
|
35 |
print("The model is on a CPU")
|
36 |
|
37 |
+
if text_generator.device == 'cuda':
|
|
|
38 |
print("The pipeline is using a GPU")
|
39 |
else:
|
40 |
print("The pipeline is using a CPU")
|