Spaces:
Runtime error
Runtime error
Adjusting an error in app.py
Browse files
app.py
CHANGED
@@ -55,7 +55,7 @@ if __name__ == "__main__":
|
|
55 |
with gr.Column():
|
56 |
# Input
|
57 |
image_input = gr.Image(
|
58 |
-
shape=
|
59 |
source="upload",
|
60 |
label="Upload an Image"
|
61 |
)
|
@@ -66,23 +66,24 @@ if __name__ == "__main__":
|
|
66 |
with gr.Column():
|
67 |
# Output
|
68 |
lbl_output = gr.Label(label="Prediction")
|
|
|
|
|
|
|
69 |
|
70 |
clr_btn.click(
|
71 |
fn=clear_inputs_and_outputs,
|
72 |
inputs=[],
|
73 |
-
outputs=[image_input, lbl_output
|
74 |
)
|
75 |
prd_btn.click(
|
76 |
fn=predict,
|
77 |
inputs=[image_input],
|
78 |
-
outputs=[lbl_output
|
79 |
)
|
80 |
|
81 |
gr.Examples(
|
82 |
-
examples=[
|
83 |
-
|
84 |
-
os.path.join(os.path.curdir, "examples", "sample2.jpg"),
|
85 |
-
],
|
86 |
inputs=image_input,
|
87 |
outputs=lbl_output,
|
88 |
fn=predict,
|
|
|
55 |
with gr.Column():
|
56 |
# Input
|
57 |
image_input = gr.Image(
|
58 |
+
shape=(256,256),
|
59 |
source="upload",
|
60 |
label="Upload an Image"
|
61 |
)
|
|
|
66 |
with gr.Column():
|
67 |
# Output
|
68 |
lbl_output = gr.Label(label="Prediction")
|
69 |
+
#plt_output = gr.Plot(
|
70 |
+
# label="Prediction", show_label=False
|
71 |
+
#)
|
72 |
|
73 |
clr_btn.click(
|
74 |
fn=clear_inputs_and_outputs,
|
75 |
inputs=[],
|
76 |
+
outputs=[image_input, lbl_output],
|
77 |
)
|
78 |
prd_btn.click(
|
79 |
fn=predict,
|
80 |
inputs=[image_input],
|
81 |
+
outputs=[lbl_output],
|
82 |
)
|
83 |
|
84 |
gr.Examples(
|
85 |
+
#examples=[os.path.join(os.path.dirname(__file__), "ShowLetter.jpg")],
|
86 |
+
examples=[os.path.join(os.path.curdir, "ShowLetter.jpg")],
|
|
|
|
|
87 |
inputs=image_input,
|
88 |
outputs=lbl_output,
|
89 |
fn=predict,
|