HaohuaLv commited on
Commit
d708f3f
·
1 Parent(s): 31140a5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -24,7 +24,7 @@ def load_candidates(candidate_dir):
24
  dataset = [dict(image=Image.open(tempfile.name).convert("RGB").resize((224, 224))) for tempfile in candidate_dir]
25
  dataset = Dataset.from_list(dataset)
26
  with torch.no_grad():
27
- dataset = dataset.map(preprocess, batched=True, batch_size=1024)
28
 
29
  return dataset
30
 
 
24
  dataset = [dict(image=Image.open(tempfile.name).convert("RGB").resize((224, 224))) for tempfile in candidate_dir]
25
  dataset = Dataset.from_list(dataset)
26
  with torch.no_grad():
27
+ dataset = dataset.map(preprocess, batched=True, batch_size=64)
28
 
29
  return dataset
30