Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
arun477 committed Sep 17, 2023
1 parent 670281a commit 91cb80d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from pathlib import Path
import datetime
import numpy as np
from pydantic import BaseModel

app = FastAPI()

Expand Down Expand Up @@ -36,9 +35,8 @@ def store_img(image):
image.save(output_path)

@app.post("/predict")
async def predict(image):
async def predict(image:UploadFile):
tensor_image, raw_image = process_image(image)
print(tensor_image.shape)
prediction = mnist_classifier.predict(tensor_image)
store_img(raw_image)
return {"prediction": prediction}
Binary file added uploads/20230917095816.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added uploads/20230917100238.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 91cb80d

Please sign in to comment.