DawnC commited on
Commit
486453b
·
verified ·
1 Parent(s): ce57b74

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -541,10 +541,12 @@ import traceback
541
 
542
  def get_device():
543
  if torch.cuda.is_available():
544
- print('Using CUDA GPU')
545
- return torch.device('cuda')
 
 
546
  else:
547
- print('Using CPU')
548
  return torch.device('cpu')
549
 
550
  device = get_device()
 
541
 
542
  def get_device():
543
  if torch.cuda.is_available():
544
+ device = torch.device('cuda')
545
+ print(f"Using GPU: {torch.cuda.get_device_name(0)}")
546
+ print(f"GPU Memory: {torch.cuda.get_device_properties(0).total_memory / 1e9:.2f} GB")
547
+ return device
548
  else:
549
+ print("Using CPU")
550
  return torch.device('cpu')
551
 
552
  device = get_device()