itsomk ivankuzne commited on
Commit
448ea49
·
verified ·
1 Parent(s): 2a5616d

updated running devices status (#1)

Browse files

- updated running devices status (181938302bff8e0b737364ee6dae536eaf748410)


Co-authored-by: ivan Кузнецов <ivankuzne@users.noreply.huggingface.co>

Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -48,7 +48,10 @@ model = DenseNet121_CheXpert(num_labels=14, pretrained=None)
48
  model.load_state_dict(state, strict=False)
49
  model.to(device)
50
  model.eval()
51
- print(f"Model loaded successfully on {device}")
 
 
 
52
 
53
  def predict(image, threshold):
54
  """Generate predictions and Grad-CAM visualizations"""
 
48
  model.load_state_dict(state, strict=False)
49
  model.to(device)
50
  model.eval()
51
+ if device.type=='cuda':
52
+ print(f"Model loaded successfully on GPU {torch.cuda.get_device_name(torch.cuda.current_device())}")
53
+ else:
54
+ print(f"Model loaded successfully on CPU")
55
 
56
  def predict(image, threshold):
57
  """Generate predictions and Grad-CAM visualizations"""