I have a few annotators who are not very tech savvy and they massively struggle with starting Prodigy via command line. I thought perhaps it is possible to create a wrapper (a Windows desktop app) with a simple GUI where they double-click on it, choose text files to annotate and the app will spin up Prodigy. Just to change CLI to GUI.
Any advices on the easiest way to implement such GUI?
From what I read between the lines of your post (and know about the domain you're working in), it sounds like it's important that Prodigy runs on the local machines with the data and nothing is sent over a network, right? In that case, having a wrapper like that certainly makes sense.
I'd normally advocate against native apps and for web apps, but if it doesn't need to be especially portable, maybe this is a good use case for a Python-based GUI?
In theory, all you really need is a function or endpoint that takes some parameters (whatever you want to allow the user to customise), composes the Prodigy command and calls into prodigy.serve. And maybe a function that kills the current process to stop the server. For a quick proof of concept, you could also try Streamlit? I think it has all the UI elements you need out-of-the-box and it's probably the fastest way to iterate on the idea!
One a related note, something I've always wanted to try is this: All built-in recipes expose their argument annotations as the __annotations__ attribute. This includes the argument name, type (positional, option or flag), description and expected data type or conversion function (e.g. bool or a helper like split_string). Based on that information, it should be no problem to automatically generate the form fields needed to create those values. (In fact, we're doing something similar in Prodigy Teams to allow populating custom recipes via a GUI.)
Hi @ines, Thanks a lot for your thoughtful response! You got it completely right. Due to security reasons (and this is why Prodigy is excellent!) all annotations should be done on a (virtual) machine without internet. We are expanding (UK-wide) and I desperately need to come up with a low barrier solution to engage more non-techy annotators.
Genuinely, I think Prodigy Teams might be a good solution, but in the meantime I need a reasonable workaround.
I did try Streamlit for Med7 (inspired by ScispaCy), and it was OK. I haven't tried to implement more complex GUI in Streamlit, but will definitely look into.
Thinking of it more deeply, I event don't need to let my annotators to decide on the annotation interface nor to choose themselves the texts. Normally, they will be using NER+relations(corref) and I can pre-load for them tons of data to annotate.
So basically, they should be able to double-click on a desktop icon and get the Prodigy screen (for example with "rel.manual" recipe) and by the end by clicking a single button to export all annotations to .jsonl file.
I like your idea using __annotations__ attribute. I haven't delved into it before, but will do.
I'll start with writing a simple "Prodigy manager" batch file and see how it works. May be I can encapsulate all what I need in a simple batch file.
I will keep you posted on my progress and share my findings. Thanks again for your incredibly important and great work!