Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ def get_digit(digit_choice):
|
|
14 |
digit = train_images[rn]
|
15 |
fig = plt.figure()
|
16 |
plt.imshow(digit)
|
17 |
-
out_txt = "digit
|
18 |
return fig, out_txt
|
19 |
|
20 |
iface = gr.Interface(
|
@@ -22,8 +22,8 @@ iface = gr.Interface(
|
|
22 |
#inputs='image',
|
23 |
#inputs=[gr.inputs.Image(label="Input Image", source="webcam")],
|
24 |
inputs = [
|
25 |
-
gr.inputs.Dropdown([0, 1, 2, 3])
|
26 |
-
|
27 |
#'text'
|
28 |
],
|
29 |
#outputs='image',
|
|
|
14 |
digit = train_images[rn]
|
15 |
fig = plt.figure()
|
16 |
plt.imshow(digit)
|
17 |
+
out_txt = "digit: %d\ndigit label: %d" % (digit_choice, test_labels[rn])
|
18 |
return fig, out_txt
|
19 |
|
20 |
iface = gr.Interface(
|
|
|
22 |
#inputs='image',
|
23 |
#inputs=[gr.inputs.Image(label="Input Image", source="webcam")],
|
24 |
inputs = [
|
25 |
+
#gr.inputs.Dropdown([0, 1, 2, 3])
|
26 |
+
gr.inputs.Number()
|
27 |
#'text'
|
28 |
],
|
29 |
#outputs='image',
|