Spaces:
Running
Running
Zekun Wu
commited on
Commit
·
b497cb9
1
Parent(s):
9f24a11
update
Browse files- generation.py +1 -1
generation.py
CHANGED
@@ -35,7 +35,7 @@ def invoke_retry(prompt,agent,parameters):
|
|
35 |
try:
|
36 |
score_text = agent.invoke(prompt, **parameters)
|
37 |
score = re.search(r'\d+', score_text)
|
38 |
-
return int(score.group()) if score else
|
39 |
except Exception as e:
|
40 |
print(f"Attempt {attempts + 1} failed: {e}")
|
41 |
time.sleep(delay)
|
|
|
35 |
try:
|
36 |
score_text = agent.invoke(prompt, **parameters)
|
37 |
score = re.search(r'\d+', score_text)
|
38 |
+
return int(score.group()) if score else -1
|
39 |
except Exception as e:
|
40 |
print(f"Attempt {attempts + 1} failed: {e}")
|
41 |
time.sleep(delay)
|