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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -78,12 +78,12 @@ def image_transformation(image):
78
  return image
79
 
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
87
 
88
  def main():
89
 
@@ -105,8 +105,8 @@ def main():
105
  # labels = ohe.fit_transform(label).toarray()
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")
 
78
  return image
79
 
80
 
81
+ # def image_prediction(image, model):
82
+ # image = image_transformation(image=image)
83
+ # outputs = float(model.predict(image))
84
+ # _, y_hat = outputs.max(1)
85
+ # predicted_idx = str(y_hat.item())
86
+ # return predicted_idx
87
 
88
  def main():
89
 
 
105
  # labels = ohe.fit_transform(label).toarray()
106
 
107
  if pred_button:
108
+
109
+ outputs = float(model.predict(image))
110
  _, y_hat = outputs.max(1)
111
  predicted_idx = str(y_hat.item())
112
  right_column.title("Prediction")