From d9baa4f40b97c7c0537120c20baeb7f90b035986 Mon Sep 17 00:00:00 2001 From: "sweep-nightly[bot]" <131841235+sweep-nightly[bot]@users.noreply.github.com> Date: Sat, 25 Nov 2023 08:54:32 +0000 Subject: [PATCH] feat: Updated src/api.py --- src/api.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api.py b/src/api.py index 36c257a..8c33837 100644 --- a/src/api.py +++ b/src/api.py @@ -1,11 +1,11 @@ -from fastapi import FastAPI, UploadFile, File -from PIL import Image import torch +from cnn import CNN # Importing CNN class from cnn.py +from fastapi import FastAPI, File, UploadFile +from PIL import Image from torchvision import transforms -from main import Net # Importing Net class from main.py # Load the model -model = Net() +model = CNN() model.load_state_dict(torch.load("mnist_model.pth")) model.eval()