m-ric HF staff commited on
Commit
46edcf6
β€’
1 Parent(s): 8f3365d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,7 +1,8 @@
1
  import torch
2
  print(f"Is CUDA available: {torch.cuda.is_available()}")
3
  # True
4
- print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
 
5
 
6
  STYLE = """
7
  .container {
 
1
  import torch
2
  print(f"Is CUDA available: {torch.cuda.is_available()}")
3
  # True
4
+ if torch.cuda.is_available():
5
+ print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
6
 
7
  STYLE = """
8
  .container {