Update process_data.py
Browse files- process_data.py +3 -1
process_data.py
CHANGED
|
@@ -326,6 +326,8 @@ def pre_processing(input_data, parameters):
|
|
| 326 |
for text_label, text_body in input_data["input_text_pieces"].items():
|
| 327 |
for parameter_name, parameter_value in parameters.items():
|
| 328 |
if 'pre_prompt' in parameter_name and parameter_value and not isinstance(parameter_value, bool) and text_body:
|
|
|
|
|
|
|
| 329 |
print("Prompt followed by data entered")
|
| 330 |
print(parameter_value)
|
| 331 |
print(text_body)
|
|
@@ -341,7 +343,7 @@ def pre_processing(input_data, parameters):
|
|
| 341 |
print("Response text")
|
| 342 |
print(response_text)
|
| 343 |
|
| 344 |
-
|
| 345 |
|
| 346 |
return input_data
|
| 347 |
|
|
|
|
| 326 |
for text_label, text_body in input_data["input_text_pieces"].items():
|
| 327 |
for parameter_name, parameter_value in parameters.items():
|
| 328 |
if 'pre_prompt' in parameter_name and parameter_value and not isinstance(parameter_value, bool) and text_body:
|
| 329 |
+
print("Text Label")
|
| 330 |
+
print(text_label)
|
| 331 |
print("Prompt followed by data entered")
|
| 332 |
print(parameter_value)
|
| 333 |
print(text_body)
|
|
|
|
| 343 |
print("Response text")
|
| 344 |
print(response_text)
|
| 345 |
|
| 346 |
+
input_data["input_text_pieces"]["pre_processed_pieces"][text_label] = response_text
|
| 347 |
|
| 348 |
return input_data
|
| 349 |
|