KaburaJ commited on
Commit
06815a5
·
1 Parent(s): d403440

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -80,7 +80,7 @@ def image_transformation(image):
80
 
81
  def image_prediction(image, model):
82
  image = image_transformation(image=image)
83
- outputs = model.predict(image)
84
  _, y_hat = outputs.max(1)
85
  predicted_idx = str(y_hat.item())
86
  return predicted_idx
@@ -106,7 +106,7 @@ def main():
106
 
107
  if pred_button:
108
  image_prediction(image=image, model=model)
109
- outputs = int(model.predict(image_prediction))
110
  _, y_hat = outputs.max(1)
111
  predicted_idx = str(y_hat.item())
112
  right_column.title("Prediction")
 
80
 
81
  def image_prediction(image, model):
82
  image = image_transformation(image=image)
83
+ outputs = double(model.predict(image))
84
  _, y_hat = outputs.max(1)
85
  predicted_idx = str(y_hat.item())
86
  return predicted_idx
 
106
 
107
  if pred_button:
108
  image_prediction(image=image, model=model)
109
+ outputs = double(model.predict(image_prediction))
110
  _, y_hat = outputs.max(1)
111
  predicted_idx = str(y_hat.item())
112
  right_column.title("Prediction")