Run using functions defined as:
def analyse_improvement_comments(source_file: str) -> pd.DataFrame:
# code
)
# Sanitising the data of sensitive information, on default patterns and appends the result
improvement_cascade.sanitiser.add_pattern(
# code
)
improvement_cascade.sanitiser.run()
# Set the LLM Handler for this cascade instance
improvement_cascade.set_llm_handler(
# code
)
# Run the llm_handler
improvement_cascade.llm_handler.run("HandlerImprovementComments1")
# Output the result in the specified format
return improvement_cascade.get_output()
def analyse_dept_comments(source_file: str) -> pd.DataFrame:
# Intialising a cascade object, setting its first record from the source file
department_cascade = gd.Cascade(
# code
)
# Sanitising the data of sensitive information, on default patterns and appends the result
department_cascade.sanitiser.add_pattern(
# code
)
department_cascade.sanitiser.run()
# Set the LLM Handler for this cascade instance
department_cascade.set_llm_handler(
# code
)
# Run the llm_handler
department_cascade.llm_handler.run("HandlerDeptSatisfactionComments1")
# Output the result in the specified format
return department_cascade.get_output()
Then imported and ran like this:
# Run generation cascades and store result
improvement_generation = analyse_improvement_comments(improvement_input)
department_generation = analyse_dept_comments(department_input)
See attached logs for error.
Output seemed fine.
logs.txt
Run using functions defined as:
Then imported and ran like this:
See attached logs for error.
Output seemed fine.
logs.txt