BhumikaMak commited on
Commit
c3d8605
·
1 Parent(s): e8f8ad5

Fix: gradio interface

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -21,11 +21,12 @@ def process_image(image, yolo_versions=["yolov5"]):
21
  result_images.append((Image.fromarray(image), f"{yolo_version} not yet implemented."))
22
  return result_images
23
 
24
- # Paths to sample images
25
- sample_images = [
26
- os.path.join(os.getcwd(), "data/xai/sample1.jpeg"),
27
- os.path.join(os.getcwd(), "data/xai/sample2.jpg")
28
- ]
 
29
 
30
  def load_sample(sample_name):
31
  if sample_name and sample_name in sample_images:
 
21
  result_images.append((Image.fromarray(image), f"{yolo_version} not yet implemented."))
22
  return result_images
23
 
24
+
25
+ sample_images = {
26
+ "Sample 1": os.path.join(os.getcwd(), "data/xai/sample1.jpeg"),,
27
+ "Sample 2": os.path.join(os.getcwd(), "data/xai/sample2.jpg")
28
+ }
29
+
30
 
31
  def load_sample(sample_name):
32
  if sample_name and sample_name in sample_images: