Spaces:
Sleeping
Sleeping
Commit
·
17d21ea
1
Parent(s):
f641d1c
removed examples from app.py
Browse files
app.py
CHANGED
|
@@ -21,7 +21,7 @@ def classify_image(img):
|
|
| 21 |
loaded_model = MNISTnet(input_channels=1, num_labels=10, hidden_layers=5).eval()
|
| 22 |
#put the state dict values
|
| 23 |
model_state_dict_path = Path("/models/MNISTnet_state_dict.pt")
|
| 24 |
-
loaded_model.load_state_dict(torch.load(model_state_dict_path
|
| 25 |
# make the prediction
|
| 26 |
with torch.inference_mode():
|
| 27 |
predicted_idx = loaded_model(model_input_tensor_image).argmax(dim=1)
|
|
|
|
| 21 |
loaded_model = MNISTnet(input_channels=1, num_labels=10, hidden_layers=5).eval()
|
| 22 |
#put the state dict values
|
| 23 |
model_state_dict_path = Path("/models/MNISTnet_state_dict.pt")
|
| 24 |
+
loaded_model.load_state_dict(torch.load(model_state_dict_path))
|
| 25 |
# make the prediction
|
| 26 |
with torch.inference_mode():
|
| 27 |
predicted_idx = loaded_model(model_input_tensor_image).argmax(dim=1)
|