Run Open-Interpreter Locally using Python

Hello, I just want to know, Can we Integrate GPT with Python code somehow using Open-Interpreter.
Open-Interpreter (Code-Llama) is working locally, but can we automate this using Python Code (Except - Python Terminal)