Spaces:
Runtime error
Runtime error
rohithk-03
commited on
Commit
·
e88283e
1
Parent(s):
c503401
update model code
Browse files
app.py
CHANGED
@@ -297,7 +297,7 @@ def predict():
|
|
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
|
301 |
image = Image.open(temp_path).convert("RGB")
|
302 |
output = model_new(transform(image).unsqueeze(0))
|
303 |
stage = output.item()
|
|
|
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)
|
301 |
image = Image.open(temp_path).convert("RGB")
|
302 |
output = model_new(transform(image).unsqueeze(0))
|
303 |
stage = output.item()
|