# in a seperate terminal: # ollama run gemma2 import requests prompt = "Why the sky is blue?" data = { "model": "gemma2:2b", "prompt": prompt, "stream": False } response = requests.post("http://localhost:11434/api/generate", json=data) json_response = response.json() message = json_response["response"] print(message)