Update process_data.py
Browse files- process_data.py +14 -14
process_data.py
CHANGED
|
@@ -611,8 +611,8 @@ def parse_survey_stack(data):
|
|
| 611 |
processed_data["inputstyle"] = data[0]['data']['inputstyle']['value'][0]
|
| 612 |
print("STEPWISE?: " + str(processed_data["inputstyle"]))
|
| 613 |
|
| 614 |
-
parameter_inputs = data[0]['data']['group_8']
|
| 615 |
-
print("PARAM INPUTS" + str(parameter_inputs))
|
| 616 |
|
| 617 |
processed_data["prompts"] = {}
|
| 618 |
|
|
@@ -642,15 +642,15 @@ def parse_survey_stack(data):
|
|
| 642 |
processed_data["input_text_pieces"]["treatment_data_input"] = trials_inputs.get('treatment_data_input', {}).get('value', None)
|
| 643 |
|
| 644 |
print("NOW ONTO THE PROMPTS")
|
| 645 |
-
processed_data["prompts"]["first_schema_prompt_one"] =
|
| 646 |
-
processed_data["prompts"]["first_schema_prompt_two"] =
|
| 647 |
-
processed_data["prompts"]["first_schema_prompt_three"] =
|
| 648 |
-
processed_data["prompts"]["first_schema_prompt_four"] =
|
| 649 |
-
processed_data["prompts"]["first_schema_prompt_five"] =
|
| 650 |
-
processed_data["prompts"]["second_schema_prompt_one"] =
|
| 651 |
-
processed_data["prompts"]["second_schema_prompt_two"] =
|
| 652 |
-
processed_data["prompts"]["third_schema_prompt_one"] =
|
| 653 |
-
processed_data["prompts"]["third_schema_prompt_two"] =
|
| 654 |
|
| 655 |
elif processed_data["inputstyle"] == "big-block-input-text":
|
| 656 |
print("IN THE SINGLE")
|
|
@@ -658,9 +658,9 @@ def parse_survey_stack(data):
|
|
| 658 |
print(processed_data["input_text"])
|
| 659 |
|
| 660 |
print("NOW ONTO THE PROMPTS")
|
| 661 |
-
processed_data["prompts"]["first_schema_prompt"] =
|
| 662 |
-
processed_data["prompts"]["second_schema_prompt"] =
|
| 663 |
-
processed_data["prompts"]["third_schema_prompt"] =
|
| 664 |
|
| 665 |
|
| 666 |
# parameters
|
|
|
|
| 611 |
processed_data["inputstyle"] = data[0]['data']['inputstyle']['value'][0]
|
| 612 |
print("STEPWISE?: " + str(processed_data["inputstyle"]))
|
| 613 |
|
| 614 |
+
#parameter_inputs = data[0]['data']['group_8']
|
| 615 |
+
#print("PARAM INPUTS" + str(parameter_inputs))
|
| 616 |
|
| 617 |
processed_data["prompts"] = {}
|
| 618 |
|
|
|
|
| 642 |
processed_data["input_text_pieces"]["treatment_data_input"] = trials_inputs.get('treatment_data_input', {}).get('value', None)
|
| 643 |
|
| 644 |
print("NOW ONTO THE PROMPTS")
|
| 645 |
+
processed_data["prompts"]["first_schema_prompt_one"] = data.get('firstschemaprompt1', {}).get('value', None)
|
| 646 |
+
processed_data["prompts"]["first_schema_prompt_two"] = data.get('firstschemaprompt2', {}).get('value', None)
|
| 647 |
+
processed_data["prompts"]["first_schema_prompt_three"] = data.get('firstschemaprompt3', {}).get('value', None)
|
| 648 |
+
processed_data["prompts"]["first_schema_prompt_four"] = data.get('firstschemaprompt4', {}).get('value', None)
|
| 649 |
+
processed_data["prompts"]["first_schema_prompt_five"] = data.get('firstschemaprompt5', {}).get('value', None)
|
| 650 |
+
processed_data["prompts"]["second_schema_prompt_one"] = data.get('secondschemaprompt1', {}).get('value', None)
|
| 651 |
+
processed_data["prompts"]["second_schema_prompt_two"] = data.get('secondschemaprompt2', {}).get('value', None)
|
| 652 |
+
processed_data["prompts"]["third_schema_prompt_one"] = data.get('thirdschemaprompt1', {}).get('value', None)
|
| 653 |
+
processed_data["prompts"]["third_schema_prompt_two"] = data.get('thirdschemaprompt2', {}).get('value', None)
|
| 654 |
|
| 655 |
elif processed_data["inputstyle"] == "big-block-input-text":
|
| 656 |
print("IN THE SINGLE")
|
|
|
|
| 658 |
print(processed_data["input_text"])
|
| 659 |
|
| 660 |
print("NOW ONTO THE PROMPTS")
|
| 661 |
+
processed_data["prompts"]["first_schema_prompt"] = data.get('firstschemaprompt', {}).get('value', None)
|
| 662 |
+
processed_data["prompts"]["second_schema_prompt"] = data.get('secondschemaprompt', {}).get('value', None)
|
| 663 |
+
processed_data["prompts"]["third_schema_prompt"] = data.get('thirdschemaprompt', {}).get('value', None)
|
| 664 |
|
| 665 |
|
| 666 |
# parameters
|