Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -14,8 +14,6 @@ model = None
|
|
14 |
image = None
|
15 |
prediction = None
|
16 |
labels = None
|
17 |
-
max_label_index = None
|
18 |
-
max_prediction_value = -1 # Initialize max_prediction_value here
|
19 |
|
20 |
print('START')
|
21 |
np.set_printoptions(suppress=True)
|
@@ -34,6 +32,9 @@ def classify(image_path):
|
|
34 |
normalized_image_array = (image_array.astype(np.float32) / 127.0) - 1
|
35 |
data[0] = normalized_image_array
|
36 |
prediction = model.predict(data)
|
|
|
|
|
|
|
37 |
|
38 |
print('Prediction')
|
39 |
|
|
|
14 |
image = None
|
15 |
prediction = None
|
16 |
labels = None
|
|
|
|
|
17 |
|
18 |
print('START')
|
19 |
np.set_printoptions(suppress=True)
|
|
|
32 |
normalized_image_array = (image_array.astype(np.float32) / 127.0) - 1
|
33 |
data[0] = normalized_image_array
|
34 |
prediction = model.predict(data)
|
35 |
+
|
36 |
+
max_label_index = None
|
37 |
+
max_prediction_value = -1
|
38 |
|
39 |
print('Prediction')
|
40 |
|