Keetawan commited on
Commit
fd26b36
1 Parent(s): 90523b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -41,7 +41,7 @@ def predict(img) -> Tuple[Dict, float]:
41
  densenet121.eval()
42
  with torch.inference_mode():
43
  # Pass the transformed image through the model and turn the prediction logits into prediction probabilities
44
- pred_probs = torch.softmax(effnetb2(img), dim=1)
45
 
46
  # Create a prediction label and prediction probability dictionary for each prediction class (this is the required format for Gradio's output parameter)
47
  pred_labels_and_probs = {class_names[i]: float(pred_probs[0][i]) for i in range(len(class_names))}
 
41
  densenet121.eval()
42
  with torch.inference_mode():
43
  # Pass the transformed image through the model and turn the prediction logits into prediction probabilities
44
+ pred_probs = torch.softmax(densenet121(img), dim=1)
45
 
46
  # Create a prediction label and prediction probability dictionary for each prediction class (this is the required format for Gradio's output parameter)
47
  pred_labels_and_probs = {class_names[i]: float(pred_probs[0][i]) for i in range(len(class_names))}