Update app.py
Browse files
app.py
CHANGED
@@ -3,9 +3,9 @@ import tensorflow as tf
|
|
3 |
import gradio as gr
|
4 |
from huggingface_hub import from_pretrained_keras
|
5 |
|
6 |
-
teacher_model = from_pretrained_keras("
|
7 |
|
8 |
-
student_model = from_pretrained_keras("
|
9 |
|
10 |
class_names = [
|
11 |
"Airplane",
|
@@ -54,10 +54,10 @@ input = gr.inputs.Image(shape=(IMG_SIZE, IMG_SIZE))
|
|
54 |
output = [gr.outputs.Label(label = "Teacher Model Output"), gr.outputs.Label(label = "Student Model Output")]
|
55 |
|
56 |
title = "Image Classification using Consistency training with supervision"
|
57 |
-
description = "Upload an image or select from examples to classify it.<br>The allowed classes are - Airplane, Automobile, Bird, Cat, Deer, Dog, Frog, Horse, Ship, Truck.<br><p><b>Teacher Model Repo - </b> <br><b> Student Model Repo -
|
58 |
|
59 |
|
60 |
-
article = "<div style='text-align: center;'><a href='https://twitter.com/_Blazer_007' target='_blank'>Space by Vivek Rai</a><br><a href='https://
|
61 |
|
62 |
gr_interface = gr.Interface(
|
63 |
infer,
|
|
|
3 |
import gradio as gr
|
4 |
from huggingface_hub import from_pretrained_keras
|
5 |
|
6 |
+
teacher_model = from_pretrained_keras("keras-io/consistency_training_with_supervision_teacher_model")
|
7 |
|
8 |
+
student_model = from_pretrained_keras("keras-io/consistency_training_with_supervision_student_model")
|
9 |
|
10 |
class_names = [
|
11 |
"Airplane",
|
|
|
54 |
output = [gr.outputs.Label(label = "Teacher Model Output"), gr.outputs.Label(label = "Student Model Output")]
|
55 |
|
56 |
title = "Image Classification using Consistency training with supervision"
|
57 |
+
description = "Upload an image or select from examples to classify it.<br>The allowed classes are - Airplane, Automobile, Bird, Cat, Deer, Dog, Frog, Horse, Ship, Truck.<br><p><b>Teacher Model Repo - https://huggingface.co/keras-io/consistency_training_with_supervision_teacher_model</b> <br><b> Student Model Repo - https://huggingface.co/keras-io/consistency_training_with_supervision_student_model </b><br><b>Keras Example - https://keras.io/examples/vision/consistency_training/</b></p>"
|
58 |
|
59 |
|
60 |
+
article = "<div style='text-align: center;'><a href='https://twitter.com/_Blazer_007' target='_blank'>Space by Vivek Rai</a><br><a href='https://twitter.com/RisingSayak' target='_blank'>Keras example by Sayak Paul</a></div>"
|
61 |
|
62 |
gr_interface = gr.Interface(
|
63 |
infer,
|