of_LLms / main.py
ka1kuk's picture
Update main.py
b5787d7 verified
raw
history blame
No virus
419 Bytes
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()