nightfury commited on
Commit
d797fc2
1 Parent(s): f0a93ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -66,8 +66,9 @@ def predict(input_image:Image.Image, true_label:str):
66
 
67
  target_layers=[model.block8.branch1[-1]]
68
  use_cuda = True if torch.cuda.is_available() else False
69
- '''print ("Cuda :: ", use_cuda)'''
70
- cam = GradCAM(model=model, target_layers=target_layers) ''', use_cuda=use_cuda)'''
 
71
  targets = [ClassifierOutputTarget(0)]
72
 
73
  grayscale_cam = cam(input_tensor=face, targets=targets, eigen_smooth=True)
 
66
 
67
  target_layers=[model.block8.branch1[-1]]
68
  use_cuda = True if torch.cuda.is_available() else False
69
+ #print ("Cuda :: ", use_cuda)
70
+ cam = GradCAM(model=model, target_layers=target_layers)
71
+ #, use_cuda=use_cuda)
72
  targets = [ClassifierOutputTarget(0)]
73
 
74
  grayscale_cam = cam(input_tensor=face, targets=targets, eigen_smooth=True)