import subprocess def run_command(command): try: result = subprocess.run(command, shell=True, check=True, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) print(f"Success: {result.stdout}") except subprocess.CalledProcessError as e: print(f"Error: {e.stderr}") def main(): # Start Ollama server run_command("ollama serve") if __name__ == "__main__": main()