4rtemi5 commited on
Commit
3418bf2
1 Parent(s): 88974f6

Ad download progress bar...

Browse files
Files changed (1) hide show
  1. utils.py +7 -0
utils.py CHANGED
@@ -24,6 +24,13 @@ class CustomDataSet(torch.utils.data.Dataset):
24
  image = PilImage.open(img_loc).convert("RGB")
25
  tensor_image = self.transform(image)
26
  return tensor_image
 
 
 
 
 
 
 
27
 
28
 
29
  def text_encoder(text, model, tokenizer):
 
24
  image = PilImage.open(img_loc).convert("RGB")
25
  tensor_image = self.transform(image)
26
  return tensor_image
27
+
28
+
29
+ class DownloadProgressBar(tqdm):
30
+ def update_to(self, b=1, bsize=1, tsize=None):
31
+ if tsize is not None:
32
+ self.total = tsize
33
+ self.update(b * bsize - self.n)
34
 
35
 
36
  def text_encoder(text, model, tokenizer):