hcs commited on
Commit
6d7b1c4
1 Parent(s): 70c2d4f

Add application file

Browse files
Files changed (1) hide show
  1. core.py +2 -1
core.py CHANGED
@@ -39,4 +39,5 @@ def fun(img_path):
39
  with torch.no_grad():
40
  img = img.unsqueeze(0).to(device)
41
  output = net(img).squeeze(1).cpu().numpy()[0]
42
- return min(100, "%.1f" % (output * 20) + 15)
 
 
39
  with torch.no_grad():
40
  img = img.unsqueeze(0).to(device)
41
  output = net(img).squeeze(1).cpu().numpy()[0]
42
+ v = float("%.1f" % (output * 20))
43
+ return min(100, v + 15.0)