MENU

Fun & Interesting

Python + GPT-4o + Flask = AI Meal Calorie Detector (GPT-4 Vision API)

Unconventional Coding 6,453 11 months ago
Video Not Working? Fix It Now

In today's video I create a GPT-4o powered simple meal calorie detector where you can upload an image of a meal and it will analyze it and tell you how many calories is in the meal GitHub: https://github.com/unconv/calorieapp Support: https://buymeacoffee.com/unconv Consultations: https://www.buymeacoffee.com/unconv/e/146735 Memberships: https://www.buymeacoffee.com/unconv/membership 00:00 Testing with ChatGPT UI 03:38 Start coding: Connect to GPT-4o API 08:45 How to set the OpenAI API key 12:44 Getting JSON output from GPT4-o 18:25 Creating the Flask server 19:19 Design UI with ChatGPT 27:47 Handling the file upload 39:32 Adding a loading spinner 46:01 Final demo 47:19 Outro

Comment