niuyazhe commited on
Commit
e65449c
1 Parent(s): 5a4a4f3

fix(nyz): fix level1 bugs

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. llmriddles/questions/level1.py +1 -1
app.py CHANGED
@@ -50,7 +50,7 @@ if _LANG == "cn":
50
  <div align="center">
51
  <img src="https://raw.githubusercontent.com/opendilab/LLMRiddles/main/llmriddles/assets/banner.svg" width="80%" height="20%" alt="Banner Image">
52
  </div>
53
- <h2 style="text-align: center; color: black;"><a href="https://github.com/OpenDILab"> 🎭LLM Riddles:完蛋!我被 LLM 拿捏了</a></h2>
54
  <h4 align="center"> 如果你喜欢这个项目,请给我们在 GitHub 点个 star ✨ 。我们将会持续保持更新。再次感谢游戏<a href="https://www.zhihu.com/people/haoqiang-fan"> 原作者 </a>的奇思妙想! </h4>
55
  <strong><h5 align="center">注意:算法模型的输出可能包含一定的随机性。相关结果不代表任何开发者和相关 AI 服务的态度和意见。本项目开发者不对生成结果作任何保证,仅供娱乐。<h5></strong>
56
  """
@@ -91,7 +91,7 @@ elif _LANG == "en":
91
  <div align="center">
92
  <img src="https://raw.githubusercontent.com/opendilab/LLMRiddles/main/llmriddles/assets/banner.svg" width="80%" height="20%" alt="Banner Image">
93
  </div>
94
- <h2 style="text-align: center; color: black;"><a href="https://github.com/OpenDILab"> 🎭LLM Riddles: Oops! Rolling in LLM.</a></h2>
95
  <h4 align="center"> If you like our project, please give us a star ✨ on GitHub for latest update. Thanks for the interesting idea of the original game <a href="https://www.zhihu.com/people/haoqiang-fan"> author </a>. </h4>
96
  <strong><h5 align="center">Notice: The output is generated by algorithm scheme and may involve some randomness. It does not represent the attitudes and opinions of any developers and AI services in this project. We do not make any guarantees about the generated content.<h5></strong>
97
  """
 
50
  <div align="center">
51
  <img src="https://raw.githubusercontent.com/opendilab/LLMRiddles/main/llmriddles/assets/banner.svg" width="80%" height="20%" alt="Banner Image">
52
  </div>
53
+ <h2 style="text-align: center; color: black;"><a href="https://github.com/OpenDILab/LLMRiddles"> 🎭LLM Riddles:完蛋!我被 LLM 拿捏了</a></h2>
54
  <h4 align="center"> 如果你喜欢这个项目,请给我们在 GitHub 点个 star ✨ 。我们将会持续保持更新。再次感谢游戏<a href="https://www.zhihu.com/people/haoqiang-fan"> 原作者 </a>的奇思妙想! </h4>
55
  <strong><h5 align="center">注意:算法模型的输出可能包含一定的随机性。相关结果不代表任何开发者和相关 AI 服务的态度和意见。本项目开发者不对生成结果作任何保证,仅供娱乐。<h5></strong>
56
  """
 
91
  <div align="center">
92
  <img src="https://raw.githubusercontent.com/opendilab/LLMRiddles/main/llmriddles/assets/banner.svg" width="80%" height="20%" alt="Banner Image">
93
  </div>
94
+ <h2 style="text-align: center; color: black;"><a href="https://github.com/OpenDILab/LLMRiddles"> 🎭LLM Riddles: Oops! Rolling in LLM.</a></h2>
95
  <h4 align="center"> If you like our project, please give us a star ✨ on GitHub for latest update. Thanks for the interesting idea of the original game <a href="https://www.zhihu.com/people/haoqiang-fan"> author </a>. </h4>
96
  <strong><h5 align="center">Notice: The output is generated by algorithm scheme and may involve some randomness. It does not represent the attitudes and opinions of any developers and AI services in this project. We do not make any guarantees about the generated content.<h5></strong>
97
  """
llmriddles/questions/level1.py CHANGED
@@ -145,7 +145,7 @@ def _checker_4(question_text: str, user_text: str, answer_text: str, lang: str):
145
  if count_words(user_text) > 1:
146
  return False, "用户的问题长度应该在一个字及以内" if lang == 'cn' else 'Question should be one word.'
147
  elif count_words(answer_text) >= 20:
148
- return False, "大语言模型的答案应该小于100个字" if lang == 'cn' else 'Answer should be less than 20 words.'
149
  else:
150
  return True, None
151
 
 
145
  if count_words(user_text) > 1:
146
  return False, "用户的问题长度应该在一个字及以内" if lang == 'cn' else 'Question should be one word.'
147
  elif count_words(answer_text) >= 20:
148
+ return False, "大语言模型的答案应该小于20个字" if lang == 'cn' else 'Answer should be less than 20 words.'
149
  else:
150
  return True, None
151