Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -78,12 +78,12 @@ def image_transformation(image):
|
|
78 |
return image
|
79 |
|
80 |
|
81 |
-
def image_prediction(image, model):
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
|
88 |
def main():
|
89 |
|
@@ -105,8 +105,8 @@ def main():
|
|
105 |
# labels = ohe.fit_transform(label).toarray()
|
106 |
|
107 |
if pred_button:
|
108 |
-
|
109 |
-
outputs =
|
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")
|