Skip to content

Commit

Permalink
feat: Updated src/api.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-nightly[bot] authored Nov 25, 2023
1 parent 1137cdd commit d9baa4f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/api.py
Original file line number Diff line number Diff line change
@@ -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()

Expand Down

0 comments on commit d9baa4f

Please sign in to comment.