Coding Guideline for an Interactive Setup in Academic Machine Learning Research

Last update was on Jan 3, 2024.

In an interactive setup, a human user can interact with a machine learning model via a website, and get a model response based on some user inputs. This is a short tutorial on how to quickly implement this interactive setup by sending data (e.g., user inputs) from a webpage to Python and sending back some data (e.g., model responses) from Python to the webpage. Specifically, you can deploy a machine learning model by communicating data between JavaScript and Python. This blog is a very brief introduction to get you started, and you could find more tutorials on JavaScript and flask to further configure this setup for your own project.

Tools

Guideline

More

This coding structure is used in our work Continually Improving Extractive QA via Human Feedback, where a user asks a question, receives a model answer highlighted in a context paragraph, and provides feedback to the model answer. We use Firebase as an external database, and Google Cloud to host the website.