Spaces:
Sleeping
Sleeping
update app.py
Browse files
app.py
CHANGED
@@ -52,7 +52,7 @@ def predict(image):
|
|
52 |
|
53 |
with gr.Blocks(css=".gradio-container {background:honeydew;}", title="MNIST Classification"
|
54 |
) as demo:
|
55 |
-
gr.HTML("""<div style="font-family:'Times New Roman', 'Serif'; font-size:16pt; font-weight:bold; text-align:center; color:royalblue;">MNIST
|
56 |
|
57 |
with gr.Row():
|
58 |
with gr.Tab("Canvas"):
|
@@ -60,7 +60,7 @@ with gr.Blocks(css=".gradio-container {background:honeydew;}", title="MNIST Clas
|
|
60 |
send_btn1 = gr.Button("Infer")
|
61 |
|
62 |
with gr.Tab("Image file"):
|
63 |
-
input_image2 = gr.Image(
|
64 |
send_btn2 = gr.Button("Infer")
|
65 |
gr.Examples(['examples/sample02.png', 'examples/sample04.png'], inputs=input_image2)
|
66 |
|
|
|
52 |
|
53 |
with gr.Blocks(css=".gradio-container {background:honeydew;}", title="MNIST Classification"
|
54 |
) as demo:
|
55 |
+
gr.HTML("""<div style="font-family:'Times New Roman', 'Serif'; font-size:16pt; font-weight:bold; text-align:center; color:royalblue;">MNIST Classification</div>""")
|
56 |
|
57 |
with gr.Row():
|
58 |
with gr.Tab("Canvas"):
|
|
|
60 |
send_btn1 = gr.Button("Infer")
|
61 |
|
62 |
with gr.Tab("Image file"):
|
63 |
+
input_image2 = gr.Image(type="pil", image_mode="L", shape=(28, 28), invert_colors=True)
|
64 |
send_btn2 = gr.Button("Infer")
|
65 |
gr.Examples(['examples/sample02.png', 'examples/sample04.png'], inputs=input_image2)
|
66 |
|