Skip to content

Commit

Permalink
rm print
Browse files Browse the repository at this point in the history
  • Loading branch information
YanxinLu committed Jul 24, 2024
1 parent 89fccc3 commit 43a2ac4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scicode/gen/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def extract_python_script(response: str):
if '```' in response:
python_script = response.split("```python")[1].split("```")[0] if '```python' in response else response.split('```')[1].split('```')[0]
else:
print(response)
print("Fail to extract python code from specific format.")
python_script = response
python_script = re.sub(r'^\s*(import .*|from .*\s+import\s+.*)', '', python_script, flags=re.MULTILINE)
return python_script
Expand Down

0 comments on commit 43a2ac4

Please sign in to comment.