Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -211,8 +211,12 @@ model = YOLO()
|
|
211 |
# model = torch.load("Model_IV.pt")
|
212 |
# model.eval()
|
213 |
checkpoint = torch.load("Model_IV.pt")
|
214 |
-
model.load_state_dict(checkpoint) # Load the saved weights
|
215 |
-
model.eval() # Set the model to evaluation mode
|
|
|
|
|
|
|
|
|
216 |
|
217 |
# Define preprocessing
|
218 |
transform = T.Compose([
|
|
|
211 |
# model = torch.load("Model_IV.pt")
|
212 |
# model.eval()
|
213 |
checkpoint = torch.load("Model_IV.pt")
|
214 |
+
# model.load_state_dict(checkpoint) # Load the saved weights
|
215 |
+
# model.eval() # Set the model to evaluation mode
|
216 |
+
|
217 |
+
print(type(checkpoint))
|
218 |
+
if isinstance(checkpoint, dict):
|
219 |
+
print(checkpoint.keys())
|
220 |
|
221 |
# Define preprocessing
|
222 |
transform = T.Compose([
|