MCPcopy Create free account
hub / github.com/NVIDIA/vid2vid / add_images

Method add_images

util/html.py:33–46  ·  view source on GitHub ↗
(self, ims, txts, links, width=400, height=0)

Source from the content-addressed store, hash-verified

31 self.doc.add(self.t)
32
33 def add_images(self, ims, txts, links, width=400, height=0):
34 self.add_table()
35 with self.t:
36 with tr():
37 for im, txt, link in zip(ims, txts, links):
38 with td(style="word-wrap: break-word;", halign="center", valign="top"):
39 with p():
40 with a(href=os.path.join('images', link)):
41 if height != 0:
42 img(style="width:%dpx;height:%dpx" % (width, height), src=os.path.join('images', im))
43 else:
44 img(style="width:%dpx" % (width), src=os.path.join('images', im))
45 br()
46 p(txt)
47
48 def save(self):
49 html_file = '%s/index.html' % self.web_dir

Callers 3

html.pyFile · 0.80
save_imagesMethod · 0.80

Calls 1

add_tableMethod · 0.95

Tested by

no test coverage detected