File size: 419 Bytes
4ade382 c7ac3ce 06bbd1d c7ac3ce |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
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()
|