Start multiple sessions from Flask

Hi @MaxB!

Thanks for your question! It is a great question.

What's the error message you're seeing? If you open your browser's developer tools, do you see a request error there? Maybe CORS related? Is there any traceback in the terminal?

It seems your goal is to use Prodigy from a Flask application. Here's a past post on why to be cautious on running Prodigy within any other web server (like Flask):

This answer can vary but have you seen this FAQ on multi-sessions/annotators? Here's an excerpt:

One option we recommend is to divide up the annotation work so that each annotator only needs to deal with a small part of the annotation scheme. For instance, if you’re working with many labels, you would start a number of different Prodigy services, each specifying a different label, and each advertising to a different URL. Prodigy can be easily run under automation, for instance within a Kubernetes cluster, to make this approach more manageable. If you do want to have multiple annotators working on one feed, Prodigy has support for that as well via named multi-user sessions. You can create annotator-specific queues using query parameters, or use the query parameters to distinguish the work of different annotators so you can run inter-annotator consistency checks.

Are you aware of multi-user sessions? If this doesn't fit your goals, definitely keep searching Prodigy support. There are 50+ issues on handling multiple sessions and hopefully it can provide you more help depending on your goals.

Hope this helps!