Spaces:
Runtime error
Runtime error
update app.py
Browse files
app.py
CHANGED
@@ -39,20 +39,18 @@ with gr.Blocks(title="ViT ImageNet Classification - ClassCat",
|
|
39 |
gr.HTML("""<div style="font-family:'Times New Roman', 'Serif'; font-size:16pt; font-weight:bold; text-align:center; color:royalblue;">ViT - ImageNet Classification</div>""")
|
40 |
|
41 |
with gr.Row():
|
42 |
-
|
43 |
-
input_image = gr.Image(type="pil", image_mode="RGB", shape=(224, 224))
|
44 |
-
|
45 |
-
with gr.Row():
|
46 |
-
gr.Examples(['./samples/cat.jpg'], label='Sample images : cat', inputs=input_image)
|
47 |
-
gr.Examples(['./samples/cheetah.jpg'], label='cheetah', inputs=input_image)
|
48 |
-
gr.Examples(['./samples/hotdog.jpg'], label='hotdog', inputs=input_image)
|
49 |
-
gr.Examples(['./samples/lion.jpg'], label='lion', inputs=input_image)
|
50 |
-
#gr.Examples(example_files, inputs=input_image)
|
51 |
-
|
52 |
output_label=gr.Label(label="Probabilities", num_top_classes=3)
|
53 |
|
54 |
send_btn = gr.Button("Infer")
|
55 |
send_btn.click(fn=classify_image, inputs=input_image, outputs=output_label)
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
#demo.queue(concurrency_count=3)
|
58 |
demo.launch(debug=True)
|
|
|
39 |
gr.HTML("""<div style="font-family:'Times New Roman', 'Serif'; font-size:16pt; font-weight:bold; text-align:center; color:royalblue;">ViT - ImageNet Classification</div>""")
|
40 |
|
41 |
with gr.Row():
|
42 |
+
input_image = gr.Image(type="pil", image_mode="RGB", shape=(224, 224))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
output_label=gr.Label(label="Probabilities", num_top_classes=3)
|
44 |
|
45 |
send_btn = gr.Button("Infer")
|
46 |
send_btn.click(fn=classify_image, inputs=input_image, outputs=output_label)
|
47 |
|
48 |
+
with gr.Row():
|
49 |
+
gr.Examples(['./samples/cat.jpg'], label='Sample images : cat', inputs=input_image)
|
50 |
+
gr.Examples(['./samples/cheetah.jpg'], label='cheetah', inputs=input_image)
|
51 |
+
gr.Examples(['./samples/hotdog.jpg'], label='hotdog', inputs=input_image)
|
52 |
+
gr.Examples(['./samples/lion.jpg'], label='lion', inputs=input_image)
|
53 |
+
#gr.Examples(example_files, inputs=input_image)
|
54 |
+
|
55 |
#demo.queue(concurrency_count=3)
|
56 |
demo.launch(debug=True)
|