ollama_server / app.py
broadfield-dev's picture
Update app.py
72a373d verified
raw
history blame
373 Bytes
import ollama
from huggingface_hub import login
def run_ollama(prompt,token=""):
# Login to Hugging Face
login(token=token)
# Load and run the model
model = ollama.load_model("tinyllama")
response = model.run("Why is the sky blue")
print(response)
return response
if __name__ == "__main__":
response = run_ollama()
print(response)