-
-
Notifications
You must be signed in to change notification settings - Fork 854
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Import + Translate recipe images with OpenAI #3974
feat: Import + Translate recipe images with OpenAI #3974
Conversation
This is great! I've tested this on a few Swedish recipes and it generally works as expected. I will add some examples of where I find things going wrong. Most might be what gpt4-o returned. But it might also be something we might improve upon with better prompting. Nothing critical, but some might be fixable. Example one:
|
This is a great idea indeed! |
@michael-genson has already added this! 😄 |
Oh sorry about that, I tried it before I fixed my OpenAI setup I see now ;) It works indeed, awesome! Thanks for your response! |
A note on the translation. I use Mealie (and all other software) in English. But I and those I share the instance with have all my recipes in my first language (Swedish). To translate a recipe, I have to change the Mealie language to Swedish, to the importing, and then change the language back 😛 I will almost never use the translate feature, so it does not matter for me. But thought it was worth noting. |
Co-authored-by: Johan Lindell <johan@lindell.me>
Yeah I tried building that into the prompt:
It just seems to ignore it sometimes ¯\_(ツ)_/¯
I figure this is an edge-case, but maybe we can build it into the UI somehow. Maybe in the next iteration |
wow this is rad, i have a ton of recipe cards we've saved from our old meal-box plans back in the day (blue apron, martha & marley spoon, etc) and would love to be able to import them just by running them through the scanner! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Co-authored-by: boc-the-git <3479092+boc-the-git@users.noreply.github.com>
Co-authored-by: boc-the-git <3479092+boc-the-git@users.noreply.github.com>
Co-authored-by: Johan Lindell <johan@lindell.me> Co-authored-by: boc-the-git <3479092+boc-the-git@users.noreply.github.com>
This is really cool! Showed the feature to my girlfriend, has huge wife-approvalfactor! |
This feature got you married @felixschndr ? |
(Sadly) not :D I didn't know wheter there was a word for girlfriend approval factor so I set |
What type of PR is this?
(REQUIRED)
What this PR does / why we need it:
(REQUIRED)
This adds a new recipe creation method to create recipes from images using AI. Optionally, users may opt to translate the recipe into their own language as well.
Here's the new interface:


Copying the work from recipe timeline events, you can rotate/crop the image after uploading it:

It can take a while, so we have a loading text/animation:

And voilà, a handwritten recipe translated from German to English:

I don't speak German, so I hope it's accurate 😅 But it seems to check out (ingredient/step counts, similar words, etc.).
Which issue(s) this PR fixes:
(REQUIRED)
Closes #660
Closes #1588
Closes #3899
Kind of addresses #3011 (see special notes below)
Special notes for your reviewer:
(fill-in or delete this section)
The translate feature is super helpful even without the image processing. At some point I plan to have a more general "Import with AI" that can accept URLs, text, images, etc.
Testing
(fill-in or delete this section)
Tested with a ton of images of recipes from Google, as well as some cookbooks I have at home. Works great!