Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -109,15 +109,15 @@ def predict_and_explain(image):
|
|
| 109 |
"error log": error_message
|
| 110 |
}
|
| 111 |
|
| 112 |
-
#
|
| 113 |
iface = gr.Interface(
|
| 114 |
-
fn=predict_and_explain,
|
| 115 |
-
inputs=gr.Image(type="pil"),
|
| 116 |
outputs=[
|
| 117 |
gr.Textbox(label="Predicted Class"),
|
| 118 |
gr.Image(label="Grad-CAM Map"),
|
| 119 |
-
gr.Textbox(label="Error Log")
|
| 120 |
-
],
|
| 121 |
title="Chest X-ray Classification with Debugging Logs"
|
| 122 |
)
|
| 123 |
|
|
|
|
| 109 |
"error log": error_message
|
| 110 |
}
|
| 111 |
|
| 112 |
+
# Use the updated Gradio components syntax
|
| 113 |
iface = gr.Interface(
|
| 114 |
+
fn=predict_and_explain,
|
| 115 |
+
inputs=gr.Image(type="pil"), # Proper input type for images
|
| 116 |
outputs=[
|
| 117 |
gr.Textbox(label="Predicted Class"),
|
| 118 |
gr.Image(label="Grad-CAM Map"),
|
| 119 |
+
gr.Textbox(label="Error Log")
|
| 120 |
+
],
|
| 121 |
title="Chest X-ray Classification with Debugging Logs"
|
| 122 |
)
|
| 123 |
|