Nvd commited on
Commit
6c9d55c
·
1 Parent(s): 496591d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -16,17 +16,13 @@ def preprocess_image(image):
16
  return image
17
 
18
  def predict_image(model, image):
19
-
20
- if torch.sum(image) == 0:
21
- return 404
22
-
23
  model.eval()
24
  with torch.no_grad():
25
  output = model(image)
26
-
27
  _, predicted = torch.max(output.data, 1)
28
  return predicted.item()
29
-
30
  def main():
31
 
32
  model = SimpleCNN()
 
16
  return image
17
 
18
  def predict_image(model, image):
 
 
 
 
19
  model.eval()
20
  with torch.no_grad():
21
  output = model(image)
22
+ print(output)
23
  _, predicted = torch.max(output.data, 1)
24
  return predicted.item()
25
+
26
  def main():
27
 
28
  model = SimpleCNN()