Spaces:
Runtime error
Runtime error
Commit
·
0170c1c
1
Parent(s):
dc0b091
Update utils/predict.py
Browse files- utils/predict.py +4 -5
utils/predict.py
CHANGED
|
@@ -21,10 +21,9 @@ AUTO = tf.data.AUTOTUNE
|
|
| 21 |
|
| 22 |
def predict(image_path):
|
| 23 |
"""
|
| 24 |
-
This function is used for fetching predictions corresponding to
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
2. actual expected outcome for each entry in the input dataframe
|
| 28 |
"""
|
| 29 |
|
| 30 |
test_image1 = load_img(image_path,target_size =(32,32))
|
|
@@ -48,7 +47,7 @@ def predict(image_path):
|
|
| 48 |
|
| 49 |
|
| 50 |
def predict_batch(image_path):
|
| 51 |
-
|
| 52 |
test_ds = tf.data.Dataset.from_tensor_slices((x_test, y_test))
|
| 53 |
test_ds = test_ds.batch(config.batch_size).prefetch(AUTO)
|
| 54 |
slice = test_ds.take(1)
|
|
|
|
| 21 |
|
| 22 |
def predict(image_path):
|
| 23 |
"""
|
| 24 |
+
This function is used for fetching predictions corresponding to input_image.
|
| 25 |
+
|
| 26 |
+
It outputs confidence scores corresponding to each class on which the model was trained
|
|
|
|
| 27 |
"""
|
| 28 |
|
| 29 |
test_image1 = load_img(image_path,target_size =(32,32))
|
|
|
|
| 47 |
|
| 48 |
|
| 49 |
def predict_batch(image_path):
|
| 50 |
+
|
| 51 |
test_ds = tf.data.Dataset.from_tensor_slices((x_test, y_test))
|
| 52 |
test_ds = test_ds.batch(config.batch_size).prefetch(AUTO)
|
| 53 |
slice = test_ds.take(1)
|