Spaces:
Runtime error
Runtime error
rohithk-03
commited on
Commit
·
de39501
1
Parent(s):
d020327
update gdrive url
Browse files
model.py
CHANGED
@@ -137,6 +137,7 @@ def check_file(image_path):
|
|
137 |
outputs = model(images)
|
138 |
_, predicted = torch.max(outputs.data, 1)
|
139 |
output = predicted
|
|
|
140 |
|
141 |
def remove_module_from_checkpoint(checkpoint):
|
142 |
new_state_dict = {}
|
@@ -154,5 +155,5 @@ def check_file(image_path):
|
|
154 |
model.eval()
|
155 |
model.to(device)
|
156 |
model = nn.DataParallel(model)
|
157 |
-
test_model(model, test_loader, device)
|
158 |
return output
|
|
|
137 |
outputs = model(images)
|
138 |
_, predicted = torch.max(outputs.data, 1)
|
139 |
output = predicted
|
140 |
+
return predicted
|
141 |
|
142 |
def remove_module_from_checkpoint(checkpoint):
|
143 |
new_state_dict = {}
|
|
|
155 |
model.eval()
|
156 |
model.to(device)
|
157 |
model = nn.DataParallel(model)
|
158 |
+
output = test_model(model, test_loader, device)
|
159 |
return output
|