Skip to content

Commit

Permalink
Update app.py
Browse files Browse the repository at this point in the history
Adding new labels
  • Loading branch information
hollandaputri authored Dec 13, 2023
1 parent 1a38c59 commit e4021b9
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,29 @@ async def predict_image(img: UploadFile, response: Response):
elif arr[0][1]==1:
labels='Fresh Banana'
elif arr[0][2]==1:
labels='Fresh Oranges'
labels='Fresh Cucumber'
elif arr[0][3]==1:
labels='Rotten Apples'
labels='Fresh Okra'
elif arr[0][4]==1:
labels='Rotten Banana'
labels='Fresh Oranges'
elif arr[0][5]==1:
labels='Fresh Potato'
elif arr[0][6]==1:
labels='Fresh Tomato'
elif arr[0][7]==1:
labels='Rotten Apples'
elif arr[0][8]==1:
labels='Rotten Banana'
elif arr[0][9]==1:
labels='Rotten Cucumber'
elif arr[0][10]==1:
labels='Rotten Okra'
elif arr[0][11]==1:
labels='Rotten Oranges'
elif arr[0][12]==1:
labels='Rotten Potato'
elif arr[0][13]==1:
labels='Rotten Tomato'

return {"result":labels}
except Exception as e:
Expand Down

0 comments on commit e4021b9

Please sign in to comment.