Spaces:
Running
Running
arvind6599
commited on
Commit
·
dff6d96
1
Parent(s):
7e8b548
logging output1
Browse files
app.py
CHANGED
@@ -224,7 +224,7 @@ def submit_prompt(email, name, system_prompt_1, system_prompt_2, system_prompt_3
|
|
224 |
f"Result: {verdict}\n"
|
225 |
)
|
226 |
verdicts.append(verdict)
|
227 |
-
answers_list.append(answer)
|
228 |
continue
|
229 |
else:
|
230 |
verdict = "Incorrect (Query was irrelevant, but no user message found)"
|
@@ -235,7 +235,7 @@ def submit_prompt(email, name, system_prompt_1, system_prompt_2, system_prompt_3
|
|
235 |
f"Result: {verdict}\n"
|
236 |
)
|
237 |
verdicts.append(verdict)
|
238 |
-
answers_list.append(answer)
|
239 |
continue
|
240 |
|
241 |
# If the expected output is a JSON object but answer is a String
|
@@ -248,7 +248,7 @@ def submit_prompt(email, name, system_prompt_1, system_prompt_2, system_prompt_3
|
|
248 |
f"Result: {verdict}\n"
|
249 |
)
|
250 |
verdicts.append(verdict)
|
251 |
-
answers_list.append(answer)
|
252 |
continue
|
253 |
|
254 |
try:
|
@@ -263,7 +263,7 @@ def submit_prompt(email, name, system_prompt_1, system_prompt_2, system_prompt_3
|
|
263 |
f"Result: {verdict}\n"
|
264 |
)
|
265 |
verdicts.append(verdict)
|
266 |
-
answers_list.append(answer)
|
267 |
continue
|
268 |
|
269 |
# Verify that all required keys are present.
|
@@ -278,7 +278,7 @@ def submit_prompt(email, name, system_prompt_1, system_prompt_2, system_prompt_3
|
|
278 |
f"Result: {verdict}\n"
|
279 |
)
|
280 |
verdicts.append(verdict)
|
281 |
-
answers_list.append(json.dumps(parsed_answer))
|
282 |
continue
|
283 |
|
284 |
# Compare values for each required key.
|
@@ -302,8 +302,8 @@ def submit_prompt(email, name, system_prompt_1, system_prompt_2, system_prompt_3
|
|
302 |
f"Result: {verdict}\n"
|
303 |
)
|
304 |
verdicts.append(verdict)
|
305 |
-
answers_list.append(json.dumps(parsed_answer))
|
306 |
-
|
307 |
result_details = "\n".join(responses)
|
308 |
|
309 |
# Record this email locally so that subsequent submissions are blocked.
|
|
|
224 |
f"Result: {verdict}\n"
|
225 |
)
|
226 |
verdicts.append(verdict)
|
227 |
+
answers_list.append(f"{output1}\n --- \n{answer}\n")
|
228 |
continue
|
229 |
else:
|
230 |
verdict = "Incorrect (Query was irrelevant, but no user message found)"
|
|
|
235 |
f"Result: {verdict}\n"
|
236 |
)
|
237 |
verdicts.append(verdict)
|
238 |
+
answers_list.append(f"{output1}\n --- \n{answer}\n")
|
239 |
continue
|
240 |
|
241 |
# If the expected output is a JSON object but answer is a String
|
|
|
248 |
f"Result: {verdict}\n"
|
249 |
)
|
250 |
verdicts.append(verdict)
|
251 |
+
answers_list.append(f"{output1}\n --- \n{answer}\n")
|
252 |
continue
|
253 |
|
254 |
try:
|
|
|
263 |
f"Result: {verdict}\n"
|
264 |
)
|
265 |
verdicts.append(verdict)
|
266 |
+
answers_list.append(f"{output1}\n --- \n{answer}\n")
|
267 |
continue
|
268 |
|
269 |
# Verify that all required keys are present.
|
|
|
278 |
f"Result: {verdict}\n"
|
279 |
)
|
280 |
verdicts.append(verdict)
|
281 |
+
answers_list.append(f"{output1}\n --- \n{json.dumps(parsed_answer)}\n")
|
282 |
continue
|
283 |
|
284 |
# Compare values for each required key.
|
|
|
302 |
f"Result: {verdict}\n"
|
303 |
)
|
304 |
verdicts.append(verdict)
|
305 |
+
answers_list.append(f"{output1}\n --- \n{json.dumps(parsed_answer)}\n")
|
306 |
+
|
307 |
result_details = "\n".join(responses)
|
308 |
|
309 |
# Record this email locally so that subsequent submissions are blocked.
|