Spaces:
Runtime error
Runtime error
rohithk-03
commited on
Commit
·
c503401
1
Parent(s):
33e5a3c
update model code
Browse files
app.py
CHANGED
@@ -296,7 +296,7 @@ def predict():
|
|
296 |
model_new = ResNetRegression()
|
297 |
checkpoint = torch.load(
|
298 |
"/home/user/app/a.pth", weights_only=False, map_location=torch.device('cpu'))
|
299 |
-
checkpoint = remove_module_from_checkpoint(checkpoint)
|
300 |
model_new.load_state_dict(checkpoint['model_state_dict'])
|
301 |
image = Image.open(temp_path).convert("RGB")
|
302 |
output = model_new(transform(image).unsqueeze(0))
|
|
|
296 |
model_new = ResNetRegression()
|
297 |
checkpoint = torch.load(
|
298 |
"/home/user/app/a.pth", weights_only=False, map_location=torch.device('cpu'))
|
299 |
+
# checkpoint = remove_module_from_checkpoint(checkpoint)
|
300 |
model_new.load_state_dict(checkpoint['model_state_dict'])
|
301 |
image = Image.open(temp_path).convert("RGB")
|
302 |
output = model_new(transform(image).unsqueeze(0))
|