harshaUwm163
commited on
Commit
·
29a1c97
1
Parent(s):
b3cf2db
removed the debug=True
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import tensorflow as tf
|
|
3 |
import gradio as gr
|
4 |
from huggingface_hub import from_pretrained_keras
|
5 |
import cv2
|
6 |
-
import matplotlib.pyplot as plt
|
7 |
|
8 |
|
9 |
model = from_pretrained_keras("harsha163/CutMix_data_augmentation_for_image_classification")
|
@@ -36,8 +36,8 @@ def read_image(image):
|
|
36 |
image.set_shape([None, None, 3])
|
37 |
print('$$$$$$$$$$$$$$$$$$$$$ in read image $$$$$$$$$$$$$$$$$$$$$$')
|
38 |
print(image.shape)
|
39 |
-
|
40 |
-
|
41 |
# image = tf.image.resize(images=image, size=[IMG_SIZE, IMG_SIZE])
|
42 |
# image = image / 127.5 - 1
|
43 |
image, _ = preprocess_image(image, 1) # 1 here is a temporary label
|
@@ -63,5 +63,5 @@ examples = [["./content/examples/Frog.jpg"], ["./content/examples/Truck.jpg"]]
|
|
63 |
title = "Image classification"
|
64 |
description = "Upload an image or select from examples to classify it"
|
65 |
|
66 |
-
gr_interface = gr.Interface(infer, input, output, examples=examples, allow_flagging=False, analytics_enabled=False, title=title, description=description).launch(enable_queue=True, debug=
|
67 |
gr_interface.launch()
|
|
|
3 |
import gradio as gr
|
4 |
from huggingface_hub import from_pretrained_keras
|
5 |
import cv2
|
6 |
+
# import matplotlib.pyplot as plt
|
7 |
|
8 |
|
9 |
model = from_pretrained_keras("harsha163/CutMix_data_augmentation_for_image_classification")
|
|
|
36 |
image.set_shape([None, None, 3])
|
37 |
print('$$$$$$$$$$$$$$$$$$$$$ in read image $$$$$$$$$$$$$$$$$$$$$$')
|
38 |
print(image.shape)
|
39 |
+
# plt.imshow(image)
|
40 |
+
# plt.show()
|
41 |
# image = tf.image.resize(images=image, size=[IMG_SIZE, IMG_SIZE])
|
42 |
# image = image / 127.5 - 1
|
43 |
image, _ = preprocess_image(image, 1) # 1 here is a temporary label
|
|
|
63 |
title = "Image classification"
|
64 |
description = "Upload an image or select from examples to classify it"
|
65 |
|
66 |
+
gr_interface = gr.Interface(infer, input, output, examples=examples, allow_flagging=False, analytics_enabled=False, title=title, description=description).launch(enable_queue=True, debug=False)
|
67 |
gr_interface.launch()
|