Harsh-Jadhav commited on
Commit
e3facda
1 Parent(s): a48c88f

Update app.py

Browse files

updated arg pred

Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -9,7 +9,8 @@ learn = load_learner(model_path)
9
  def predict(image):
10
  img = PILImage.create(image)
11
  pred, _, probs = learn.predict(img)
12
- return pred, probs[pred]
 
13
 
14
  # Streamlit app
15
  st.title("Hand Gesture Recognition")
 
9
  def predict(image):
10
  img = PILImage.create(image)
11
  pred, _, probs = learn.predict(img)
12
+ pred_idx = torch.argmax(probs)
13
+ return pred, probs[pred_idx].item()
14
 
15
  # Streamlit app
16
  st.title("Hand Gesture Recognition")