Update app.py
Browse files
app.py
CHANGED
@@ -53,7 +53,7 @@ def one_hot_decoding(labels):
|
|
53 |
return true_labels
|
54 |
|
55 |
def model_output(image):
|
56 |
-
image = cv2.imread(image)
|
57 |
PIL_image = Image.fromarray(image.astype('uint8'), 'RGB')
|
58 |
|
59 |
img_size = (224,224)
|
@@ -74,6 +74,6 @@ def model_output(image):
|
|
74 |
|
75 |
return output_text
|
76 |
|
77 |
-
app = gr.Interface(fn=model_output, inputs="image", outputs="text")
|
78 |
app.launch(debug=True)
|
79 |
|
|
|
53 |
return true_labels
|
54 |
|
55 |
def model_output(image):
|
56 |
+
#image = cv2.imread(image)
|
57 |
PIL_image = Image.fromarray(image.astype('uint8'), 'RGB')
|
58 |
|
59 |
img_size = (224,224)
|
|
|
74 |
|
75 |
return output_text
|
76 |
|
77 |
+
app = gr.Interface(fn=model_output, inputs="image", outputs="text", examples=[["sample_images/train_142.jpg"], ["sample_images/train_75.jpg"], ["sample_images/train_92.jpg"]])
|
78 |
app.launch(debug=True)
|
79 |
|