ysharma HF staff commited on
Commit
e02092b
1 Parent(s): 5a19e34

update llm logic

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -148,13 +148,13 @@ def lang_model_response(prompt, language):
148
  solution = output_tmp.split("Réponse: ")[2].split("\n")[0]
149
  else:
150
  if '?' in output_tmp:
151
- solution = output_tmp.split("?")[1]
152
  elif '.' in output_tmp:
153
- solution = output_tmp.split(".")[1]
154
  elif ',' in output_tmp:
155
- solution = output_tmp.split(",")[1]
156
  else:
157
- solution = output_tmp[:25]
158
  print(f"Another language was used : {language}")
159
  # solution = output_tmp.split(".")[1]
160
  print(f"Final Bloom Response after splits is: {solution}")
 
148
  solution = output_tmp.split("Réponse: ")[2].split("\n")[0]
149
  else:
150
  if '?' in output_tmp:
151
+ solution = output_tmp.split("?")[0]
152
  elif '.' in output_tmp:
153
+ solution = output_tmp.split(".")[0]
154
  elif ',' in output_tmp:
155
+ solution = output_tmp.split(",")[0]
156
  else:
157
+ solution = output_tmp #[:10]
158
  print(f"Another language was used : {language}")
159
  # solution = output_tmp.split(".")[1]
160
  print(f"Final Bloom Response after splits is: {solution}")