hafizarslan commited on
Commit
91191c0
·
verified ·
1 Parent(s): 53e6a69

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -28,14 +28,15 @@ def segment_image(input_image):
28
 
29
  return bigger_output
30
 
31
- # Gradio Interface
32
  demo = gr.Interface(
33
  fn=segment_image,
34
  inputs=gr.Image(type="pil", label="Upload Blood Smear Image"),
35
  outputs=gr.Image(type="pil", label="Predicted Grayscale Mask"),
36
  title="Malaria Blood Smear Segmentation (SegFormer - Pretrained)",
37
  description="Upload a blood smear image to segment it using a pretrained SegFormer model (ADE20K 150 classes).",
38
- examples=["1.png", "2.png", "3.png"] # Example images
 
39
  )
40
 
41
  if __name__ == "__main__":
 
28
 
29
  return bigger_output
30
 
31
+ # Gradio Interface with submit button (live=False)
32
  demo = gr.Interface(
33
  fn=segment_image,
34
  inputs=gr.Image(type="pil", label="Upload Blood Smear Image"),
35
  outputs=gr.Image(type="pil", label="Predicted Grayscale Mask"),
36
  title="Malaria Blood Smear Segmentation (SegFormer - Pretrained)",
37
  description="Upload a blood smear image to segment it using a pretrained SegFormer model (ADE20K 150 classes).",
38
+ examples=["1.png", "2.png", "3.png"],
39
+ live=False # <<< ye laga dena
40
  )
41
 
42
  if __name__ == "__main__":