akhaliq HF Staff commited on
Commit
8915112
·
1 Parent(s): e9a376f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -2
app.py CHANGED
@@ -100,8 +100,6 @@ def inference(img):
100
  input_image = Image.open(img)
101
  orig_tensor = np.asarray(input_image)
102
  input_tensor = preprocess(input_image)
103
- input_tensor = input_tensor.unsqueeze(0)
104
- input_tensor = input_tensor.detach().cpu().numpy()
105
  output_names = list(map(lambda output: output.name, outputs))
106
  input_name = sess.get_inputs()[0].name
107
  detections = sess.run(output_names, {input_name: input_tensor})
 
100
  input_image = Image.open(img)
101
  orig_tensor = np.asarray(input_image)
102
  input_tensor = preprocess(input_image)
 
 
103
  output_names = list(map(lambda output: output.name, outputs))
104
  input_name = sess.get_inputs()[0].name
105
  detections = sess.run(output_names, {input_name: input_tensor})