update llm logic
Browse files
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("?")[
|
152 |
elif '.' in output_tmp:
|
153 |
-
solution = output_tmp.split(".")[
|
154 |
elif ',' in output_tmp:
|
155 |
-
solution = output_tmp.split(",")[
|
156 |
else:
|
157 |
-
solution = output_tmp[:
|
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}")
|