broadfield-dev commited on
Commit
7b83c9e
·
verified ·
1 Parent(s): 22e9f7d

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import ollama
2
+ from huggingface_hub import login
3
+
4
+ def run_ollama(prompt,token=""):
5
+ # Login to Hugging Face
6
+ login(token=token)
7
+
8
+ # Load and run the model
9
+ model = ollama.load_model("tiny_llama")
10
+ response = model.run("Why is the sky blue")
11
+ print(response)
12
+ return response
13
+
14
+ if __name__ == "__main__":
15
+ response = run_ollama()
16
+ print(response)