dewifaj commited on
Commit
b70d34e
1 Parent(s): 11616ab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -8,12 +8,16 @@ def alz_mri_classification(image):
8
  score = prediction['score']
9
  label = prediction['label']
10
  return {"score": score, "label": label}
11
- example_image_paths = ["Very_Mild_Demented.png", "Mild_Demented.png", "Moderate_Demented.png", "Non_Demented.png"]
 
 
 
 
12
 
13
  image_input = gr.Image(type="pil", label="Upload Image")
14
  iface = gr.Interface(fn=alz_mri_classification,
15
  inputs=image_input,
16
  outputs="json",
17
- examples=[example_image_paths],
18
  title="Alzheimer Recognition from MRI")
19
  iface.launch()
 
8
  score = prediction['score']
9
  label = prediction['label']
10
  return {"score": score, "label": label}
11
+
12
+ example_image_paths = ["Very_Mild_Demented.png",
13
+ "Mild_Demented.png",
14
+ "Moderate_Demented.png",
15
+ "Non_Demented.png"]
16
 
17
  image_input = gr.Image(type="pil", label="Upload Image")
18
  iface = gr.Interface(fn=alz_mri_classification,
19
  inputs=image_input,
20
  outputs="json",
21
+ examples=[{"image": path} for path in example_image_paths],
22
  title="Alzheimer Recognition from MRI")
23
  iface.launch()