diff --git a/actions/actions.py b/actions/actions.py index d3ad2a6..3f47aab 100644 --- a/actions/actions.py +++ b/actions/actions.py @@ -10,6 +10,7 @@ from rasa_sdk.events import SlotSet from rasa_sdk import FormValidationAction from rasa_sdk.types import DomainDict + import random from datetime import datetime import pandas as pd @@ -19,6 +20,7 @@ # load static data from file # js_pth='mydata/static_data.json' js_pth='/app/actions/mydata/static_data.json' + definitions_dict, module_titles,choose_qst_variations,definitions_dict_old,other_qst_variations= load_data_from_file(js_pth) class ActionStopNavigation(Action): diff --git a/actions/functions.py b/actions/functions.py index 0417d84..f86a9a3 100644 --- a/actions/functions.py +++ b/actions/functions.py @@ -5,8 +5,9 @@ import pandas as pd print("############################# IMPORTING UTILS") -# data_path="mydata/Base_RGPH24V7_all_ID" -data_path="/app/actions/mydata/Base_RGPH24V7_all_ID" +# data_path="mydata/Base_RGPH24V7+_all_ID" +data_path="/app/actions/mydata/Base_RGPH24V7+_all_ID" + print('################################## actions run using', data_path ) df=pd.read_excel(data_path +'.xlsx') @@ -134,7 +135,7 @@ def module_recommendations(df_rslt,n=n_module): ##new -def situation_recommendations(df_rslt, module_id, n=n_situation, nan_id=4): +def situation_recommendations(df_rslt, module_id, n=n_situation, nan_id=16): # Filter the DataFrame and get unique situation IDs, excluding nan_id filtered_situation_ids = df_rslt[(df_rslt['module_ID'] == int(module_id)) & (df_rslt['situation_ID'] != nan_id)]['situation_ID'].unique() # Limit the number of situation IDs to n