Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -106,13 +106,13 @@ def build_app():
|
|
| 106 |
gr.HTML("<h1>VGG16 ImageNet Classifier</h1>")
|
| 107 |
gr.HTML("<p>Upload an image to see the top 3 predicted ImageNet classes.</p>")
|
| 108 |
|
| 109 |
-
with gr.Box():
|
| 110 |
# Place widgets in a vertical layout
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
|
| 115 |
-
|
| 116 |
|
| 117 |
# Connect button click to classification
|
| 118 |
classify_button.click(
|
|
|
|
| 106 |
gr.HTML("<h1>VGG16 ImageNet Classifier</h1>")
|
| 107 |
gr.HTML("<p>Upload an image to see the top 3 predicted ImageNet classes.</p>")
|
| 108 |
|
| 109 |
+
#with gr.Box():
|
| 110 |
# Place widgets in a vertical layout
|
| 111 |
+
image_input = gr.Image(type="numpy", label="Upload an Image")
|
| 112 |
+
confidence_slider = gr.Slider(0.0, 1.0, value=0.0, step=0.01, label="Confidence Threshold")
|
| 113 |
+
classify_button = gr.Button("Classify")
|
| 114 |
|
| 115 |
+
label_output = gr.Label(num_top_classes=3, label="Prediction Results")
|
| 116 |
|
| 117 |
# Connect button click to classification
|
| 118 |
classify_button.click(
|