kritsg commited on
Commit
df232ee
·
1 Parent(s): 0bf30a9

fixing path for video explanation

Browse files
Files changed (1) hide show
  1. image_posterior.py +2 -2
image_posterior.py CHANGED
@@ -70,7 +70,7 @@ def create_gif(explanation_blr, segments, image, n_images=20, n_max=5):
70
  # print(f"Saving gif to {save_loc}")
71
 
72
  ims = [imageio.imread(f) for f in paths]
73
- writer = imageio.get_writer('C:/Users/pineapples/Documents/research/Modeling-Uncertainty-Local-Explainability/Modeling-Uncertainty-in-Explainability-Demo/test.mp4', fps = n_images)
74
  for im in ims:
75
  writer.append_data(im)
76
  writer.close()
@@ -79,7 +79,7 @@ def create_gif(explanation_blr, segments, image, n_images=20, n_max=5):
79
  html = '''
80
  <div style='max-width:100%; max-height:360px; overflow:auto'>
81
  <video width="320" height="240" autoplay>
82
- <source src="C:/Users/pineapples/Documents/research/Modeling-Uncertainty-Local-Explainability/Modeling-Uncertainty-in-Explainability-Demo/test.mp4" type=video/mp4>
83
  </video>
84
  </div>
85
  )'''
 
70
  # print(f"Saving gif to {save_loc}")
71
 
72
  ims = [imageio.imread(f) for f in paths]
73
+ writer = imageio.get_writer('./test.mp4', fps = 10)
74
  for im in ims:
75
  writer.append_data(im)
76
  writer.close()
 
79
  html = '''
80
  <div style='max-width:100%; max-height:360px; overflow:auto'>
81
  <video width="320" height="240" autoplay>
82
+ <source src="./test.mp4" type=video/mp4>
83
  </video>
84
  </div>
85
  )'''