Ethium commited on
Commit
81a501e
1 Parent(s): fc8ff20

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -11,7 +11,6 @@ def get_x(row):
11
  def get_y(row):
12
  return row['Buried ODD']
13
 
14
- # Load the models into a dictionary
15
  models = {
16
  'Ultrasound': load_learner('ODDUltrasound.pkl'),
17
  'OCT': load_learner('ODDOCT.pkl'),
@@ -36,9 +35,9 @@ def classify_images(img_ultrasound, img_oct, img_fundus, img_fluorescence):
36
 
37
  return f"ODD Detection: {final_decision}"
38
 
39
- # Define the Gradio interface
40
- inputs = [gr.inputs.Image(shape=(192, 192), label=f"{modality} Image") for modality in modality_keys]
41
- output = gr.outputs.Text(label="Final Decision")
42
 
43
  intf = gr.Interface(fn=classify_images, inputs=inputs, outputs=output,
44
  title="ODD Detection from Multiple Imaging Modalities",
 
11
  def get_y(row):
12
  return row['Buried ODD']
13
 
 
14
  models = {
15
  'Ultrasound': load_learner('ODDUltrasound.pkl'),
16
  'OCT': load_learner('ODDOCT.pkl'),
 
35
 
36
  return f"ODD Detection: {final_decision}"
37
 
38
+ # Adjusted to use the updated Gradio API
39
+ inputs = [gr.Image(shape=(192, 192), label=f"{modality} Image") for modality in modality_keys]
40
+ output = gr.Text(label="Final Decision")
41
 
42
  intf = gr.Interface(fn=classify_images, inputs=inputs, outputs=output,
43
  title="ODD Detection from Multiple Imaging Modalities",