MCPcopy Create free account
hub / github.com/NVIDIA/pix2pixHD / __init__

Method __init__

util/html.py:7–19  ·  view source on GitHub ↗
(self, web_dir, title, refresh=0)

Source from the content-addressed store, hash-verified

5
6class HTML:
7 def __init__(self, web_dir, title, refresh=0):
8 self.title = title
9 self.web_dir = web_dir
10 self.img_dir = os.path.join(self.web_dir, 'images')
11 if not os.path.exists(self.web_dir):
12 os.makedirs(self.web_dir)
13 if not os.path.exists(self.img_dir):
14 os.makedirs(self.img_dir)
15
16 self.doc = dominate.document(title=title)
17 if refresh > 0:
18 with self.doc.head:
19 meta(http_equiv="refresh", content=str(refresh))
20
21 def get_image_dir(self):
22 return self.img_dir

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected