Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -130,15 +130,15 @@ def call_our_KNN(test_image, K=7):
|
|
| 130 |
sample_images = get_sample_images(10)
|
| 131 |
|
| 132 |
### configure inputs/outputs
|
| 133 |
-
set_image = gr.
|
| 134 |
-
set_K = gr.
|
| 135 |
|
| 136 |
-
set_label = gr.
|
| 137 |
|
| 138 |
# define output as the single class text
|
| 139 |
-
set_probability = gr.
|
| 140 |
|
| 141 |
-
set_out_images = gr.
|
| 142 |
|
| 143 |
|
| 144 |
### configure gradio, detailed can be found at https://www.gradio.app/docs/#i_slider
|
|
|
|
| 130 |
sample_images = get_sample_images(10)
|
| 131 |
|
| 132 |
### configure inputs/outputs
|
| 133 |
+
set_image = gr.Image(shape=(28, 28), image_mode='L')
|
| 134 |
+
set_K = gr.Slider(1, 24, step=1, default=7)
|
| 135 |
|
| 136 |
+
set_label = gr.Textbox(label="Predicted Digit")
|
| 137 |
|
| 138 |
# define output as the single class text
|
| 139 |
+
set_probability = gr.Label(num_top_classes=10, label="Predicted Probability Per Class")
|
| 140 |
|
| 141 |
+
set_out_images = gr.Image(label="Closest Neighbors")
|
| 142 |
|
| 143 |
|
| 144 |
### configure gradio, detailed can be found at https://www.gradio.app/docs/#i_slider
|