Skip to content

Commit

Permalink
Update app.py
Browse files Browse the repository at this point in the history
  • Loading branch information
satrio142 authored Dec 19, 2023
1 parent 374f5ee commit 24896e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ async def predict_image(img: UploadFile, response: Response):
image = np.expand_dims(image, axis=0)

# Predict the class of the image
arr = model.predict(image)
if arr[0][0]==1:
arr = model.predict(image)
if arr[0][0]==1:
labels='Fresh Apples'
elif arr[0][1]==1:
labels='Fresh Banana'
Expand All @@ -52,7 +52,7 @@ async def predict_image(img: UploadFile, response: Response):
labels='Rotten Banana'
elif arr[0][5]==1:
labels='Rotten Oranges'

return {"result":labels}
except Exception as e:
traceback.print_exc()
Expand Down

0 comments on commit 24896e8

Please sign in to comment.