Akjava commited on
Commit
81cfac3
Β·
verified Β·
1 Parent(s): ec66efc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
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
- # Assuming 'text_generator' is your initialized pipeline
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")