Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -74,7 +74,7 @@ def gradio_predict(image):
|
|
74 |
predicted_label, confidence = predict(image)
|
75 |
return f"Predicted Label: {predicted_label}, Confidence: {confidence:.4f}"
|
76 |
|
77 |
-
def gradio_mask(image, steps, increment):
|
78 |
modified_image, original_label, predicted_label = progressively_mask_image(image, steps, increment)
|
79 |
return modified_image, f"Original Label: {original_label}, New Label: {predicted_label}"
|
80 |
|
@@ -223,8 +223,8 @@ class GradioInterface:
|
|
223 |
with gr.Row(elem_classes="content-container"):
|
224 |
with gr.Column():
|
225 |
input_image = gr.Image(label="Input Image", type="pil", format="png", elem_classes="image-preview")
|
226 |
-
steps_input = gr.Slider(minimum=1, maximum=100, label="
|
227 |
-
increment_input = gr.Slider(minimum=1, maximum=
|
228 |
examples = gr.Examples(
|
229 |
examples=self.preloaded_examples,
|
230 |
inputs=input_image,
|
|
|
74 |
predicted_label, confidence = predict(image)
|
75 |
return f"Predicted Label: {predicted_label}, Confidence: {confidence:.4f}"
|
76 |
|
77 |
+
def gradio_mask(image, steps, increment=1):
|
78 |
modified_image, original_label, predicted_label = progressively_mask_image(image, steps, increment)
|
79 |
return modified_image, f"Original Label: {original_label}, New Label: {predicted_label}"
|
80 |
|
|
|
223 |
with gr.Row(elem_classes="content-container"):
|
224 |
with gr.Column():
|
225 |
input_image = gr.Image(label="Input Image", type="pil", format="png", elem_classes="image-preview")
|
226 |
+
steps_input = gr.Slider(minimum=1, maximum=100, label="Attributions Drop Percentage", step=1, value=5)
|
227 |
+
#increment_input = gr.Slider(minimum=1, maximum=100, label="increment", step=1, value=5)
|
228 |
examples = gr.Examples(
|
229 |
examples=self.preloaded_examples,
|
230 |
inputs=input_image,
|