Update process_data.py
Browse files- process_data.py +19 -23
process_data.py
CHANGED
|
@@ -173,11 +173,7 @@ def generate_json_pieces(processed_data):
|
|
| 173 |
|
| 174 |
Args:
|
| 175 |
Args:
|
| 176 |
-
|
| 177 |
-
input_data["input_text"] = (str) the preprocessed input text
|
| 178 |
-
input_data["input_context"] = (str) depending on levers, empty or what is put in front of the prompt
|
| 179 |
-
input_data["input_text_pieces"] = (dict) containing the individual split up prompt pieces: field_data_input, planting_data_input, log_data_input, soil_data_input, yield_data_input
|
| 180 |
-
|
| 181 |
parameters: (dict) All of the individual parameters and "flippers"
|
| 182 |
parameters["model_version"] = (str) what model should be used
|
| 183 |
parameters["chaining"] = (bool) whether or not the preprocessed input context should be chained (given to multiple models)
|
|
@@ -200,30 +196,30 @@ def generate_json_pieces(processed_data):
|
|
| 200 |
|
| 201 |
if processed_data["parameters"]["pre_process"] == "yes":
|
| 202 |
print("Pre prompt is true")
|
| 203 |
-
field_data_input =
|
| 204 |
-
planting_data_input =
|
| 205 |
-
log_data_input =
|
| 206 |
-
soil_data_input =
|
| 207 |
-
yield_data_input =
|
| 208 |
|
| 209 |
-
interaction_data_input =
|
| 210 |
-
person_data_input =
|
| 211 |
|
| 212 |
-
trial_data_input =
|
| 213 |
-
treatment_data_input =
|
| 214 |
else:
|
| 215 |
print("Pre prompt is false")
|
| 216 |
-
field_data_input =
|
| 217 |
-
planting_data_input =
|
| 218 |
-
log_data_input =
|
| 219 |
-
soil_data_input =
|
| 220 |
-
yield_data_input =
|
| 221 |
|
| 222 |
-
interaction_data_input =
|
| 223 |
-
person_data_input =
|
| 224 |
|
| 225 |
-
trial_data_input =
|
| 226 |
-
treatment_data_input =
|
| 227 |
|
| 228 |
|
| 229 |
# Fix these prompts for all
|
|
|
|
| 173 |
|
| 174 |
Args:
|
| 175 |
Args:
|
| 176 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
| 177 |
parameters: (dict) All of the individual parameters and "flippers"
|
| 178 |
parameters["model_version"] = (str) what model should be used
|
| 179 |
parameters["chaining"] = (bool) whether or not the preprocessed input context should be chained (given to multiple models)
|
|
|
|
| 196 |
|
| 197 |
if processed_data["parameters"]["pre_process"] == "yes":
|
| 198 |
print("Pre prompt is true")
|
| 199 |
+
field_data_input = processed_data["input_text_pieces"]["pre_processed_pieces"]["field_data_input"]
|
| 200 |
+
planting_data_input = processed_data["input_text_pieces"]["pre_processed_pieces"]["planting_data_input"]
|
| 201 |
+
log_data_input = processed_data["input_text_pieces"]["pre_processed_pieces"]["log_data_input"]
|
| 202 |
+
soil_data_input = processed_data["input_text_pieces"]["pre_processed_pieces"]["soil_data_input"]
|
| 203 |
+
yield_data_input = processed_data["input_text_pieces"]["pre_processed_pieces"]["yield_data_input"]
|
| 204 |
|
| 205 |
+
interaction_data_input = processed_data["input_text_pieces"]["pre_processed_pieces"]["interaction_data_input"]
|
| 206 |
+
person_data_input = processed_data["input_text_pieces"]["pre_processed_pieces"]["person_data_input"]
|
| 207 |
|
| 208 |
+
trial_data_input = processed_data["input_text_pieces"]["pre_processed_pieces"]["trial_data_input"]
|
| 209 |
+
treatment_data_input = processed_data["input_text_pieces"]["pre_processed_pieces"]["treatment_data_input"]
|
| 210 |
else:
|
| 211 |
print("Pre prompt is false")
|
| 212 |
+
field_data_input = processed_data["input_text_pieces"]["field_data_input"]
|
| 213 |
+
planting_data_input = processed_data["input_text_pieces"]["planting_data_input"]
|
| 214 |
+
log_data_input = processed_data["input_text_pieces"]["log_data_input"]
|
| 215 |
+
soil_data_input = processed_data["input_text_pieces"]["soil_data_input"]
|
| 216 |
+
yield_data_input = processed_data["input_text_pieces"]["yield_data_input"]
|
| 217 |
|
| 218 |
+
interaction_data_input = processed_data["input_text_pieces"]["interaction_data_input"]
|
| 219 |
+
person_data_input = processed_data["input_text_pieces"]["person_data_input"]
|
| 220 |
|
| 221 |
+
trial_data_input = processed_data["input_text_pieces"]["trial_data_input"]
|
| 222 |
+
treatment_data_input = processed_data["input_text_pieces"]["treatment_data_input"]
|
| 223 |
|
| 224 |
|
| 225 |
# Fix these prompts for all
|