BhumikaMak commited on
Commit
437ec30
·
1 Parent(s): 37d1dae

Fix: argument mismatch

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -30,11 +30,11 @@ interface = gr.Interface(
30
  type="pil",
31
  label="Upload an Image",
32
  interactive=True,
33
- value=None # This is where the sample image will be loaded when selected
34
  ),
35
  gr.CheckboxGroup(
36
  choices=["yolov5", "yolov8s"],
37
- value=["yolov5"], # Ensure default value is set correctly
38
  label="Select Model(s)",
39
  type="value", # Ensure the value is passed as a list of selected models
40
  ),
@@ -43,12 +43,15 @@ interface = gr.Interface(
43
  title="Explainable AI for YOLO Models",
44
  description="Upload an image or select a sample to visualize YOLO object detection with Grad-CAM.",
45
  examples=[
46
- [os.path.join(os.getcwd(), "data/xai/sample1.jpeg"), "yolov5"],
47
- [os.path.join(os.getcwd(), "data/xai/sample2.jpg"), "yolov8s"],
48
  ],
49
- live=True
 
50
  )
51
 
52
 
 
 
53
  if __name__ == "__main__":
54
  interface.launch()
 
30
  type="pil",
31
  label="Upload an Image",
32
  interactive=True,
33
+ value=None,
34
  ),
35
  gr.CheckboxGroup(
36
  choices=["yolov5", "yolov8s"],
37
+ value=["yolov5"], # Default value set
38
  label="Select Model(s)",
39
  type="value", # Ensure the value is passed as a list of selected models
40
  ),
 
43
  title="Explainable AI for YOLO Models",
44
  description="Upload an image or select a sample to visualize YOLO object detection with Grad-CAM.",
45
  examples=[
46
+ [os.path.join(os.getcwd(), "data/xai/sample1.jpeg")],
47
+ [os.path.join(os.getcwd(), "data/xai/sample2.jpg")],
48
  ],
49
+ live=True,
50
+ allow_flagging="never", # Optional: Disable flagging if not required
51
  )
52
 
53
 
54
+
55
+
56
  if __name__ == "__main__":
57
  interface.launch()