add clearer test running message
Browse files
app.py
CHANGED
@@ -48,7 +48,8 @@ def run_testing(user_prompt, invariant_api_key):
|
|
48 |
|
49 |
agent_params = {"system_prompt": user_prompt}
|
50 |
|
51 |
-
yield f'
|
|
|
52 |
env={
|
53 |
"INVARIANT_API_KEY": invariant_api_key,
|
54 |
"OPENAI_API_KEY": os.environ["OPENAI_API_KEY"],
|
@@ -74,7 +75,8 @@ def run_testing(user_prompt, invariant_api_key):
|
|
74 |
for line in process.stdout:
|
75 |
print(line, end="")
|
76 |
if line.startswith("__special_formatted_output__:"):
|
77 |
-
|
|
|
78 |
|
79 |
# If there is a regex match with https://explorer.invariantlabs.ai/[\-_a-zA-Z0-9/]+ then yield it
|
80 |
if url := re.search(r"https://explorer.invariantlabs.ai/[\-_a-zA-Z0-9/]+", line):
|
|
|
48 |
|
49 |
agent_params = {"system_prompt": user_prompt}
|
50 |
|
51 |
+
yield f'Running Test 0 of {TOTAL_TESTS}. Please wait.', '', 'button-loading'
|
52 |
+
|
53 |
env={
|
54 |
"INVARIANT_API_KEY": invariant_api_key,
|
55 |
"OPENAI_API_KEY": os.environ["OPENAI_API_KEY"],
|
|
|
75 |
for line in process.stdout:
|
76 |
print(line, end="")
|
77 |
if line.startswith("__special_formatted_output__:"):
|
78 |
+
current_test = int(line.split(":")[1].strip())
|
79 |
+
yield f'Running Test {current_test} of {TOTAL_TESTS}. Please wait.', '', 'button-loading'
|
80 |
|
81 |
# If there is a regex match with https://explorer.invariantlabs.ai/[\-_a-zA-Z0-9/]+ then yield it
|
82 |
if url := re.search(r"https://explorer.invariantlabs.ai/[\-_a-zA-Z0-9/]+", line):
|