Upload cogagent_infer_batch.py with huggingface_hub
Browse files- cogagent_infer_batch.py +2 -2
cogagent_infer_batch.py
CHANGED
|
@@ -11,9 +11,9 @@ from torch.utils.data import Dataset, DataLoader
|
|
| 11 |
|
| 12 |
class AITM_Dataset(Dataset):
|
| 13 |
def __init__(self, json_path):
|
| 14 |
-
self.data = []
|
| 15 |
with open(json_path, 'r') as f:
|
| 16 |
-
self.data
|
| 17 |
|
| 18 |
def __len__(self):
|
| 19 |
return len(self.data)
|
|
|
|
| 11 |
|
| 12 |
class AITM_Dataset(Dataset):
|
| 13 |
def __init__(self, json_path):
|
| 14 |
+
#self.data = []
|
| 15 |
with open(json_path, 'r') as f:
|
| 16 |
+
self.data = json.loads(f)
|
| 17 |
|
| 18 |
def __len__(self):
|
| 19 |
return len(self.data)
|