of_LLms / main.py
ka1kuk's picture
Update main.py
5c6e5ec verified
raw
history blame
No virus
505 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():
# Install script
run_command("curl -fsSL https://ollama.com/install.sh | sh")
# Start Ollama server
run_command("ollama serve")
if __name__ == "__main__":
main()