Prodigy -- Can't find custom recipe

Hello!

I have this error message "Can't find recipe 'image-caption'"
when i try to use custom recipe image-caption from the official git repository ( prodigy-recipes/image_caption.py at 0037b32d954e0b1672f9dae1e8aa53ac0c9136e3 · explosion/prodigy-recipes · GitHub )

I use this command "prodigy.serve("image-caption caption_data_tmp ./data_image/building_shape/ -F image_caption.py", port=8082)"

I don't understand why prodigy don't find the recipe even using "-F"
I launch the command from the repository where the image_caption.py file is located.

Hm. Could you try writing ./image_caption.py instead?

If you're calling the recipe from Python, using the -F flag to point to a file shouldn't actually be necessary and you could just import the file instead (e.g. import image_caption)? All the -F flag does is import Python code from a file if you're on the CLI. If you're already in a Python file, you can just import or copy-paste in the code.

Thank you for your answers

@SofieVL
I tried to write "./image_caption.py" but still the same result "Cannot find recipe 'image-caption"

@ines
Yes, I can import image_caption into my python script but I don't understand how to use it with "prodigy.serve ()"

It should just work out-of-the-box, without having to specify the file. The @prodigy.recipe decorator at the top of your recipe registers it by name. Once that runs, Prodigy can find your recipe image-caption. Just make sure you import it before you call prodigy.serve.

Yes that is what i did but still the same problem.
But:
I don't know why, if i replace "image-caption" in the script by another name it's good and i can run my server...

If it works with other names, that's definitely strange – maybe double-check that you don't have a typo or a leading/trailing space in "image-caption" in the @prodigy.recipe decorator?

I checked for typos and as indicated in another support topic, I don't use any other software to copy / paste my order (no PowerPoint, Word ...).

I don't understand but my server is running now and I only changed the name of my recipe

Thanks for all the leads, I saved a lot of time, thanks a lot

I have another issue because the server is only looping on 18 images while I have more than a hundred images in my directory, but this is another problem