updated urls
Browse files
app.py
CHANGED
|
@@ -15,9 +15,9 @@ CLASSES = {
|
|
| 15 |
8: "ship",
|
| 16 |
9: "truck",
|
| 17 |
}
|
| 18 |
-
|
| 19 |
IMAGE_SIZE = 32
|
| 20 |
|
|
|
|
| 21 |
model = from_pretrained_keras("EdoAbati/cct")
|
| 22 |
|
| 23 |
|
|
@@ -37,6 +37,7 @@ def classify_image(input_image):
|
|
| 37 |
return output_labels
|
| 38 |
|
| 39 |
|
|
|
|
| 40 |
examples = [["./bird.png"], ["./cat.png"], ["./dog.png"], ["./horse.png"]]
|
| 41 |
title = "Image Classification using Compact Convolutional Transformer (CCT)"
|
| 42 |
description = """
|
|
@@ -46,15 +47,15 @@ The model was trained on the <a href="https://www.cs.toronto.edu/~kriz/cifar.htm
|
|
| 46 |
<br />
|
| 47 |
<br />
|
| 48 |
<p>
|
| 49 |
-
<b>Model
|
| 50 |
<br />
|
| 51 |
-
<b>Keras Example
|
| 52 |
</p>
|
| 53 |
<br />
|
| 54 |
"""
|
| 55 |
article = """
|
| 56 |
<div style="text-align: center;">
|
| 57 |
-
Space by <a href="https://
|
| 58 |
<br />
|
| 59 |
Keras example by <a href="https://twitter.com/RisingSayak" target="_blank">Sayak Paul</a>
|
| 60 |
</div>
|
|
|
|
| 15 |
8: "ship",
|
| 16 |
9: "truck",
|
| 17 |
}
|
|
|
|
| 18 |
IMAGE_SIZE = 32
|
| 19 |
|
| 20 |
+
|
| 21 |
model = from_pretrained_keras("EdoAbati/cct")
|
| 22 |
|
| 23 |
|
|
|
|
| 37 |
return output_labels
|
| 38 |
|
| 39 |
|
| 40 |
+
# Gradio Interface
|
| 41 |
examples = [["./bird.png"], ["./cat.png"], ["./dog.png"], ["./horse.png"]]
|
| 42 |
title = "Image Classification using Compact Convolutional Transformer (CCT)"
|
| 43 |
description = """
|
|
|
|
| 47 |
<br />
|
| 48 |
<br />
|
| 49 |
<p>
|
| 50 |
+
<b>Model:</b> <a href="https://huggingface.co/keras-io/cct" target="_blank">https://huggingface.co/keras-io/cct</a>
|
| 51 |
<br />
|
| 52 |
+
<b>Keras Example:</b> <a href="https://keras.io/examples/vision/cct/" target="_blank">https://keras.io/examples/vision/cct/</a>
|
| 53 |
</p>
|
| 54 |
<br />
|
| 55 |
"""
|
| 56 |
article = """
|
| 57 |
<div style="text-align: center;">
|
| 58 |
+
Space by <a href="https://github.com/EdAbati" target="_blank">Edoardo Abati</a>
|
| 59 |
<br />
|
| 60 |
Keras example by <a href="https://twitter.com/RisingSayak" target="_blank">Sayak Paul</a>
|
| 61 |
</div>
|