Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -218,14 +218,20 @@ class GradioInterface:
|
|
218 |
input_image = gr.Image(label="Input Image", type="pil", format="png", elem_classes="image-preview")
|
219 |
steps_input = gr.Slider(minimum=1, maximum=100, label="Steps", step=1, value=100)
|
220 |
increment_input = gr.Slider(minimum=1, maximum=20, label="Increment", step=1, value=5)
|
|
|
|
|
|
|
|
|
|
|
221 |
with gr.Column():
|
222 |
result = gr.Image(label="Result", elem_classes="image-preview")
|
|
|
223 |
run_button = gr.Button("Run", elem_classes="gr-button")
|
224 |
|
225 |
run_button.click(
|
226 |
fn=gradio_mask,
|
227 |
inputs=[input_image, steps_input, increment_input],
|
228 |
-
outputs=[result,
|
229 |
)
|
230 |
|
231 |
return demo
|
|
|
218 |
input_image = gr.Image(label="Input Image", type="pil", format="png", elem_classes="image-preview")
|
219 |
steps_input = gr.Slider(minimum=1, maximum=100, label="Steps", step=1, value=100)
|
220 |
increment_input = gr.Slider(minimum=1, maximum=20, label="Increment", step=1, value=5)
|
221 |
+
examples = gr.Examples(
|
222 |
+
examples=self.preloaded_examples,
|
223 |
+
inputs=input_image,
|
224 |
+
label="MNIST Examples"
|
225 |
+
)
|
226 |
with gr.Column():
|
227 |
result = gr.Image(label="Result", elem_classes="image-preview")
|
228 |
+
prediction_details = gr.Textbox(label="Prediction Details")
|
229 |
run_button = gr.Button("Run", elem_classes="gr-button")
|
230 |
|
231 |
run_button.click(
|
232 |
fn=gradio_mask,
|
233 |
inputs=[input_image, steps_input, increment_input],
|
234 |
+
outputs=[result, prediction_details],
|
235 |
)
|
236 |
|
237 |
return demo
|