SkyNetWalker commited on
Commit
0879be9
·
verified ·
1 Parent(s): f346f6b

Create run.sh

Browse files
Files changed (1) hide show
  1. run.sh +22 -0
run.sh ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # Start the Ollama server in the background.
4
+ # The 'serve' command starts the Ollama API server.
5
+ ollama serve &
6
+
7
+ # Wait for the Ollama server to become available.
8
+ # We loop and check the Ollama API endpoint until it responds.
9
+ echo "Waiting for Ollama to start..."
10
+ while ! curl -s http://localhost:11434 > /dev/null; do
11
+ sleep 1
12
+ done
13
+ echo "Ollama started."
14
+
15
+ # Create and register the custom model with Ollama.
16
+ # 'gemma-unsloth' is the name you will use to refer to this model in your application.
17
+ # It uses the Modelfile we created.
18
+ ollama create gemma-unsloth -f Modelfile
19
+
20
+ # Run the Gradio application.
21
+ # The Gradio app will then communicate with the Ollama server running locally.
22
+ python app.py