Tristan Thrush commited on
Commit
6b8a006
1 Parent(s): 89fbe02
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -65,13 +65,13 @@ with demo:
65
  def _submit(state, dummy):
66
  query = parse_qs(dummy[1:])
67
  assert "assignmentId" in query, "No assignment ID provided, unable to submit"
68
- state["assignmentId"] = query["assignmentId"]
69
- state["hitId"] = query["hitId"]
70
- state["workerId"] = query["workerId"]
71
- state["turkSubmitTo"] = query["turkSubmitTo"]
72
  url = "https://workersandbox.mturk.com/mturk/externalSubmit"
73
  x = requests.post(url, data=state)
74
- return str(x) + " With assignmentId " + state["assignmentId"][0] + "\n" + x.text, state, dummy
75
 
76
  # Button event handlers
77
  submit_ex_button.click(
 
65
  def _submit(state, dummy):
66
  query = parse_qs(dummy[1:])
67
  assert "assignmentId" in query, "No assignment ID provided, unable to submit"
68
+ state["assignmentId"] = query["assignmentId"][0]
69
+ state["hitId"] = query["hitId"][0]
70
+ state["workerId"] = query["workerId"][0]
71
+ state["turkSubmitTo"] = query["turkSubmitTo"][0]
72
  url = "https://workersandbox.mturk.com/mturk/externalSubmit"
73
  x = requests.post(url, data=state)
74
+ return str(x) + " With assignmentId " + state["assignmentId"] + "\n" + x.text, state, dummy
75
 
76
  # Button event handlers
77
  submit_ex_button.click(