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

Fix: argument mismatch

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -50,7 +50,13 @@ interface = gr.Interface(
50
  allow_flagging="never", # Optional: Disable flagging if not required
51
  )
52
 
 
 
 
 
53
 
 
 
54
 
55
 
56
  if __name__ == "__main__":
 
50
  allow_flagging="never", # Optional: Disable flagging if not required
51
  )
52
 
53
+ def select_sample_image(image):
54
+ if image is None:
55
+ return os.path.join(os.getcwd(), os.path.join(os.getcwd(), "data/xai/sample1.jpeg"))
56
+ return image
57
 
58
+ # Update the interface to use the sample selection logic
59
+ interface.inputs[0].update(value=select_sample_image(None))
60
 
61
 
62
  if __name__ == "__main__":