reysarms commited on
Commit
56a3735
·
1 Parent(s): cdf3cfe

updated app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -37,8 +37,9 @@ def predict(image, model, device):
37
  with torch.no_grad():
38
  outputs = model(image_t)
39
  probs = torch.softmax(outputs, dim=1)
40
- conf, predicted = torch.max(probs, 1)
41
- return class_names[predicted.item()], conf.item()
 
42
 
43
  def main():
44
  st.title("Human Action Recognition App")
 
37
  with torch.no_grad():
38
  outputs = model(image_t)
39
  probs = torch.softmax(outputs, dim=1)
40
+ conf, predicted = torch.max(probs, dim=1)
41
+ return class_names[predicted.item()], float(conf.item()) # type: ignore
42
+
43
 
44
  def main():
45
  st.title("Human Action Recognition App")