An RLHF interface for data collection with Amazon Mechanical Turk and Gradio.
First, create a Python virtual environment and install the project's dependencies as follows:
python -m pip install -r requirements.txt
HF_TOKEN: One of your Hugging Face tokens.DATASET_REPO_URL: The url to an empty dataset that you created the hub. It
can be a private or public dataset.FORCE_PUSH: "yes"
When you run this space on mturk and when people visit your space on
huggingface.co, the app will use your token to automatically store new HITs
in your dataset. Setting FORCE_PUSH to "yes" ensures that your repo will
force push changes to the dataset during data collection. Otherwise,
accidental manual changes to your dataset could result in your space getting
merge conflicts as it automatically tries to push the dataset to the hub. For
local development, add these three keys to a .env file, and consider setting
FORCE_PUSH to "no".To launch the Space locally, run:
python app.py
The app will then be available at a local address, such as http://127.0.0.1:7860
config.py.example,
just called config.py. Now, put keys from your AWS account in config.py.
These keys should be for an AWS account that has the
AmazonMechanicalTurkFullAccess permission. You also need to
create an mturk requestor account associated with your AWS account.python collect.py locally.Now, you should be watching hits come into your Hugging Face dataset automatically!
FORCE_PUSH to "no" in
your local .env file.An RLHF interface for data collection with Amazon Mechanical Turk and Gradio.
First, create a Python virtual environment and install the project's dependencies as follows:
python -m pip install -r requirements.txt
HF_TOKEN: One of your Hugging Face tokens.DATASET_REPO_URL: The url to an empty dataset that you created the hub. It
can be a private or public dataset.FORCE_PUSH: "yes"
When you run this space on mturk and when people visit your space on
huggingface.co, the app will use your token to automatically store new HITs
in your dataset. Setting FORCE_PUSH to "yes" ensures that your repo will
force push changes to the dataset during data collection. Otherwise,
accidental manual changes to your dataset could result in your space getting
merge conflicts as it automatically tries to push the dataset to the hub. For
local development, add these three keys to a .env file, and consider setting
FORCE_PUSH to "no".To launch the Space locally, run:
python app.py
The app will then be available at a local address, such as http://127.0.0.1:7860
config.py.example,
just called config.py. Now, put keys from your AWS account in config.py.
These keys should be for an AWS account that has the
AmazonMechanicalTurkFullAccess permission. You also need to
create an mturk requestor account associated with your AWS account.python collect.py locally.Now, you should be watching hits come into your Hugging Face dataset automatically!
FORCE_PUSH to "no" in
your local .env file.