Commit
·
e6949e7
1
Parent(s):
28b4e0d
Update model.py
Browse files
model.py
CHANGED
@@ -131,7 +131,10 @@ def load_model():
|
|
131 |
|
132 |
# Load weights
|
133 |
print(PATH)
|
134 |
-
|
|
|
|
|
|
|
135 |
model = ImageCaptioner(clip_model, gpt_model, tokenizer, 0)
|
136 |
checkpoint = torch.load(PATH, map_location=torch.device('cpu'))
|
137 |
model.load_state_dict(checkpoint["state_dict"])
|
|
|
131 |
|
132 |
# Load weights
|
133 |
print(PATH)
|
134 |
+
|
135 |
+
for file_name in os.listdir(os.getcwd()):
|
136 |
+
print(file_name)
|
137 |
+
|
138 |
model = ImageCaptioner(clip_model, gpt_model, tokenizer, 0)
|
139 |
checkpoint = torch.load(PATH, map_location=torch.device('cpu'))
|
140 |
model.load_state_dict(checkpoint["state_dict"])
|