rtik007 commited on
Commit
4ef367f
·
verified ·
1 Parent(s): d7f8c6b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -109,15 +109,15 @@ def predict_and_explain(image):
109
  "error log": error_message
110
  }
111
 
112
- # Create a Gradio interface with an error log output
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") # Error log for debugging
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