Using react in hit design layout

0

Hi!

I would like to create a task where turks have to choose between the 2 videos. The 2 videos need to play in a synchronized fashion (e.g. if I pause one video, the other pauses too). I created a react web app that can do this.

I am hoping I can port my app to AMT. When creating a project, in the design layout, can I use react? And if so I presume I have to put everything in just one file; for example, I can't have a separate file for the HTML and for the js files.

Thanks!
Bassam

bassamH
asked 4 years ago388 views
3 Answers
0

Hi Bassam,

You can absolutely use your React app in your MTurk task.

Essentially, you just include the assets.crowd.aws script import, a script import for your react app, and a hidden input within <crowd-form> where your app dumps the answer data to be submitted, eg

<script src="https://assets.crowd.aws/crowd-html-elements.js"></script>
<script src="your react app's url.js"></script>

<crowd-form>
    <input type="hidden" name"answer"/>
</crowd-form>

This blog post (https://aws.amazon.com/blogs/machine-learning/build-a-custom-data-labeling-workflow-with-amazon-sagemaker-ground-truth/) talks about how to do this within the context of a SageMaker Ground Truth task, but the exact same approach works when using <crowd-form> with MTurk directly.

Reference: https://docs.aws.amazon.com/sagemaker/latest/dg/sms-ui-template-crowd-form.html

Edited by: SamH@AWS on Feb 27, 2020 1:30 PM

answered 4 years ago
0

Got it. Thanks a lot SamH!

bassamH
answered 4 years ago
0

You're welcome

answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions