Update process_data.py
Browse files- process_data.py +14 -13
process_data.py
CHANGED
|
@@ -639,26 +639,27 @@ def parse_survey_stack(data):
|
|
| 639 |
|
| 640 |
print("NOW ONTO THE PROMPTS")
|
| 641 |
input_item = input_data[0]['data']['group_7']
|
| 642 |
-
processed_data["prompts"]["first_schema_prompt_one"] = input_item
|
| 643 |
-
processed_data["prompts"]["first_schema_prompt_two"] = input_item
|
| 644 |
-
processed_data["prompts"]["first_schema_prompt_three"] = input_item
|
| 645 |
-
processed_data["prompts"]["first_schema_prompt_four"] = input_item
|
| 646 |
-
processed_data["prompts"]["first_schema_prompt_five"] = input_item
|
| 647 |
-
processed_data["prompts"]["second_schema_prompt_one"] = input_item
|
| 648 |
-
processed_data["prompts"]["second_schema_prompt_two"] = input_item
|
| 649 |
-
processed_data["prompts"]["third_schema_prompt_one"] = input_item
|
| 650 |
-
processed_data["prompts"]["third_schema_prompt_two"] = input_item
|
| 651 |
|
| 652 |
elif processed_data["inputstyle"] == "big-block-input-text":
|
| 653 |
print("IN THE SINGLE")
|
| 654 |
-
input_item = input_data[0]['data']['group_7']
|
| 655 |
processed_data["input_text"] = data[0]['data']['onelonginputtext']['value']
|
|
|
|
|
|
|
| 656 |
print(processed_data["input_text"])
|
| 657 |
|
| 658 |
print("NOW ONTO THE PROMPTS")
|
| 659 |
-
processed_data["prompts"]["first_schema_prompt"] = input_item
|
| 660 |
-
processed_data["prompts"]["second_schema_prompt"] = input_item
|
| 661 |
-
processed_data["prompts"]["third_schema_prompt"] = input_item
|
| 662 |
|
| 663 |
|
| 664 |
# parameters
|
|
|
|
| 639 |
|
| 640 |
print("NOW ONTO THE PROMPTS")
|
| 641 |
input_item = input_data[0]['data']['group_7']
|
| 642 |
+
processed_data["prompts"]["first_schema_prompt_one"] = input_item.get('firstschemaprompt1', {}).get('value')
|
| 643 |
+
processed_data["prompts"]["first_schema_prompt_two"] = input_item.get('firstschemaprompt2', {}).get('value')
|
| 644 |
+
processed_data["prompts"]["first_schema_prompt_three"] = input_item.get('firstschemaprompt3', {}).get('value')
|
| 645 |
+
processed_data["prompts"]["first_schema_prompt_four"] = input_item.get('firstschemaprompt4', {}).get('value')
|
| 646 |
+
processed_data["prompts"]["first_schema_prompt_five"] = input_item.get('firstschemaprompt5', {}).get('value')
|
| 647 |
+
processed_data["prompts"]["second_schema_prompt_one"] = input_item.get('secondschemaprompt1', {}).get('value')
|
| 648 |
+
processed_data["prompts"]["second_schema_prompt_two"] = input_item.get('secondschemaprompt2', {}).get('value')
|
| 649 |
+
processed_data["prompts"]["third_schema_prompt_one"] = input_item.get('thirdschemaprompt1', {}).get('value')
|
| 650 |
+
processed_data["prompts"]["third_schema_prompt_two"] = input_item.get('thirdschemaprompt2', {}).get('value')
|
| 651 |
|
| 652 |
elif processed_data["inputstyle"] == "big-block-input-text":
|
| 653 |
print("IN THE SINGLE")
|
|
|
|
| 654 |
processed_data["input_text"] = data[0]['data']['onelonginputtext']['value']
|
| 655 |
+
input_item = processed_data[0]['data']['group_7']
|
| 656 |
+
|
| 657 |
print(processed_data["input_text"])
|
| 658 |
|
| 659 |
print("NOW ONTO THE PROMPTS")
|
| 660 |
+
processed_data["prompts"]["first_schema_prompt"] = input_item.get('firstschemaprompt', {}).get('value')
|
| 661 |
+
processed_data["prompts"]["second_schema_prompt"] = input_item.get('secondschemaprompt', {}).get('value')
|
| 662 |
+
processed_data["prompts"]["third_schema_prompt"] = input_item.get('thirdschemaprompt', {}).get('value')
|
| 663 |
|
| 664 |
|
| 665 |
# parameters
|