rtik007 commited on
Commit
7cfbbcd
·
verified ·
1 Parent(s): 9131c16

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -109,14 +109,14 @@ 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="image",
116
  outputs=[
117
- gr.outputs.Textbox(label="Predicted Class"),
118
- gr.outputs.Image(label="Grad-CAM Map"),
119
- gr.outputs.Textbox(label="Error Log") # Error log for debugging
120
  ],
121
  title="Chest X-ray Classification with Debugging Logs"
122
  )
 
109
  "error log": error_message
110
  }
111
 
112
+ # Create a Gradio interface with an error log output using newer Gradio components
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
  )