Medvira commited on
Commit
247855b
·
verified ·
1 Parent(s): 0fc8295

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -28,7 +28,7 @@ def inference(sample_name):
28
  outputs = session.run(None, {"input": sample['path'].numpy()})
29
  predicted_age = (outputs[0]*41.172)+127.329
30
  # Get the image data from the MetaTensor and convert it to a format PIL can handle
31
- image_data = sample['path'].numpy()
32
  # Denormalize the image data
33
  for i in range(3): # Assuming the image has 3 channels
34
  image_data[i,:,:] = image_data[i,:,:] * stds[i] + means[i]
 
28
  outputs = session.run(None, {"input": sample['path'].numpy()})
29
  predicted_age = (outputs[0]*41.172)+127.329
30
  # Get the image data from the MetaTensor and convert it to a format PIL can handle
31
+ image_data = sample['path'][0].numpy()
32
  # Denormalize the image data
33
  for i in range(3): # Assuming the image has 3 channels
34
  image_data[i,:,:] = image_data[i,:,:] * stds[i] + means[i]