dh-mc commited on
Commit
0c7b7f6
·
1 Parent(s): d5ab5d2

Update logical_reasoning_utils.py

Browse files
llm_toolkit/logical_reasoning_utils.py CHANGED
@@ -116,9 +116,13 @@ P2_few_shot = """你是一个情景猜谜游戏的主持人。游戏规则如下
116
  回答:
117
  """
118
 
119
- df_translation = pd.read_csv("datasets/mgtv/unique_translations.csv")
120
- translation_dict = df_translation.set_index("chinese").to_dict(orient="index")
121
- translation_dict = {k: v["english"] for k, v in translation_dict.items()}
 
 
 
 
122
 
123
  def get_prompt_template(using_p1=True, chinese_prompt=True):
124
  if using_p1:
 
116
  回答:
117
  """
118
 
119
+ try:
120
+ df_translation = pd.read_csv("datasets/mgtv/unique_translations.csv")
121
+ translation_dict = df_translation.set_index("chinese").to_dict(orient="index")
122
+ translation_dict = {k: v["english"] for k, v in translation_dict.items()}
123
+ except Exception as e:
124
+ print(e)
125
+ translation_dict = {}
126
 
127
  def get_prompt_template(using_p1=True, chinese_prompt=True):
128
  if using_p1: