fci-advisor-api / run.sh
mostafafhasjk's picture
Create run.sh
7d9e508 verified
Raw
History Blame Contribute Delete
1.24 kB
#!/bin/bash
# Start the Ollama server in the background
ollama serve &
# Wait a few seconds to ensure the server is fully running
sleep 10
echo "Starting model download..."
# Download your specific GGUF model.
# REPLACE 'YOUR_USERNAME' WITH YOUR ACTUAL HUGGING FACE USERNAME!
wget -O fci_model.gguf https://huggingface.co/mostafafhasjk/fci-advisor-gguf/resolve/main/Qwen2.5-7B-Instruct.Q4_K_M.gguf
echo "Download complete. Creating Modelfile..."
# Create the Modelfile with your custom prompt
cat << EOF > Modelfile
FROM ./fci_model.gguf
SYSTEM """أنت مرشد أكاديمي ذكي في كلية الحاسبات والمعلومات بجامعة الفيوم.
في كل رسالة ستجد بيانات الطالب من النظام وسؤاله.
اقرأ البيانات بعناية وأجب مباشرة بناءً على وضعه الفعلي.
أجب في فقرات متصلة وسلسة، ولا تستخدم القوائم النقطية أو المعادلات الرياضية المعقدة."""
PARAMETER temperature 0.7
EOF
echo "Building the model in Ollama..."
# Create the model inside Ollama
ollama create fci-advisor -f Modelfile
echo "Server is ready! Waiting for requests..."
# Keep the container running
wait