amjadfqs commited on
Commit
f05318e
·
verified ·
1 Parent(s): cb1e024

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -18,8 +18,8 @@ def predict(image):
18
  # Get the predicted class
19
  predicted_class = logits.argmax(-1).item()
20
  # You may need to adjust the following line based on your class labels
21
- class_names = ["class1", "class2", "class3", "class4"]
22
- return predicted_class
23
 
24
  # Set up the Gradio interface
25
  image_cp = gr.Image(type="pil", label='Brain')
 
18
  # Get the predicted class
19
  predicted_class = logits.argmax(-1).item()
20
  # You may need to adjust the following line based on your class labels
21
+ class_names = ["glioma", "meningioma", "notumor", "pituitary"]
22
+ return class_names[predicted_class]
23
 
24
  # Set up the Gradio interface
25
  image_cp = gr.Image(type="pil", label='Brain')