Instructions to use omdbusiness/amal with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use omdbusiness/amal with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf omdbusiness/amal:Q4_K_M # Run inference directly in the terminal: llama cli -hf omdbusiness/amal:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf omdbusiness/amal:Q4_K_M # Run inference directly in the terminal: llama cli -hf omdbusiness/amal:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf omdbusiness/amal:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf omdbusiness/amal:Q4_K_M
Use Docker
docker model run hf.co/omdbusiness/amal:Q4_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use omdbusiness/amal with Ollama:
ollama run hf.co/omdbusiness/amal:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use omdbusiness/amal with Docker Model Runner:
docker model run hf.co/omdbusiness/amal:Q4_K_M
- Lemonade
How to use omdbusiness/amal with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull omdbusiness/amal:Q4_K_M
Run and chat with the model
lemonade run user.amal-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Download install_packages.py from omdbusiness/amal: direct link, hf CLI and curl.
- Browser
- Download file 5.25 kB
-
https://huggingface.co/omdbusiness/amal/resolve/main/install_packages.py
- Command line
-
hf download hf://omdbusiness/amal/install_packages.py
-
curl -L -o install_packages.py https://huggingface.co/omdbusiness/amal/resolve/main/install_packages.py
5.25 kB
| import subprocess | |
| import sys | |
| def install_packages(): | |
| print("تحديث pip...") | |
| subprocess.check_call([sys.executable, "-m", "pip", "install", "--upgrade", "pip", "--user"]) | |
| print("تثبيت الحزم من requirements.txt...") | |
| subprocess.check_call([sys.executable, "-m", "pip", "install", "--user", "-r", "requirements.txt"]) | |
| if __name__ == "__main__": | |
| try: | |
| install_packages() | |
| print("تم تثبيت الحزم بنجاح.") | |
| except subprocess.CalledProcessError as e: | |
| print(f"حدث خطأ أثناء التثبيت: {e}") | |
| import subprocess | |
| import sys | |
| from pathlib import Path | |
| import platform | |
| from datetime import datetime | |
| try: | |
| from colorama import init, Fore | |
| except ImportError: | |
| subprocess.check_call([sys.executable, "-m", "pip", "install", "colorama", "--user"]) | |
| from colorama import init, Fore | |
| init(autoreset=True) | |
| LOG_FILE = "install_log.txt" | |
| def log(message): | |
| with open(LOG_FILE, "a", encoding="utf-8") as f: | |
| f.write(f"[{datetime.now()}] {message}\n") | |
| def print_and_log(message, color=Fore.WHITE): | |
| print(color + message) | |
| log(message) | |
| def install_packages(): | |
| try: | |
| print_and_log("📢 نظام التشغيل: " + platform.system(), Fore.CYAN) | |
| print_and_log("🔄 جاري تحديث pip...", Fore.YELLOW) | |
| subprocess.check_call([sys.executable, "-m", "pip", "install", "--upgrade", "pip", "--user"]) | |
| requirements_path = Path("requirements.txt") | |
| if not requirements_path.exists(): | |
| print_and_log("⚠️ ملف requirements.txt غير موجود!", Fore.RED) | |
| return | |
| print_and_log("📦 جاري تثبيت الحزم من requirements.txt...", Fore.YELLOW) | |
| subprocess.check_call([sys.executable, "-m", "pip", "install", "--user", "-r", str(requirements_path)]) | |
| print_and_log("✅ تم تثبيت الحزم بنجاح.", Fore.GREEN) | |
| except subprocess.CalledProcessError as e: | |
| print_and_log(f"❌ حدث خطأ أثناء التثبيت: {e}", Fore.RED) | |
| except Exception as e: | |
| print_and_log(f"⚠️ خطأ غير متوقع: {e}", Fore.RED) | |
| if __name__ == "__main__": | |
| install_packages() | |
| import subprocess | |
| import sys | |
| import os | |
| import socket | |
| from pathlib import Path | |
| from datetime import datetime | |
| import platform | |
| try: | |
| from colorama import init, Fore, Style | |
| except ImportError: | |
| subprocess.call([sys.executable, "-m", "pip", "install", "colorama", "--user"]) | |
| from colorama import init, Fore, Style | |
| init(autoreset=True) | |
| LOG_FILE = "install_log.txt" | |
| VENV_DIR = Path("env") | |
| REQUIREMENTS_FILE = Path("requirements.txt") | |
| def log(message): | |
| with open(LOG_FILE, "a", encoding="utf-8") as f: | |
| f.write(f"[{datetime.now()}] {message}\n") | |
| def print_and_log(message, color=Fore.WHITE): | |
| print(color + message) | |
| log(message) | |
| def check_internet(host="8.8.8.8", port=53, timeout=3): | |
| try: | |
| socket.setdefaulttimeout(timeout) | |
| socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect((host, port)) | |
| return True | |
| except Exception: | |
| return False | |
| def create_virtual_env(): | |
| if not VENV_DIR.exists(): | |
| print_and_log("📦 إنشاء بيئة افتراضية...", Fore.YELLOW) | |
| subprocess.check_call([sys.executable, "-m", "venv", str(VENV_DIR)]) | |
| else: | |
| print_and_log("✅ البيئة الافتراضية موجودة مسبقًا.", Fore.CYAN) | |
| def activate_venv_command(): | |
| if platform.system() == "Windows": | |
| return str(VENV_DIR / "Scripts" / "python.exe") | |
| else: | |
| return str(VENV_DIR / "bin" / "python") | |
| def install_requirements(python_exec): | |
| if not REQUIREMENTS_FILE.exists(): | |
| print_and_log("❗ ملف requirements.txt غير موجود!", Fore.RED) | |
| return | |
| print_and_log("📥 تثبيت الحزم المطلوبة...", Fore.YELLOW) | |
| subprocess.check_call([python_exec, "-m", "pip", "install", "--upgrade", "pip"]) | |
| subprocess.check_call([python_exec, "-m", "pip", "install", "-r", str(REQUIREMENTS_FILE)]) | |
| def run_post_install_script(): | |
| script = Path("post_install.py") | |
| if script.exists(): | |
| print_and_log("🚀 تشغيل سكربت post_install.py...", Fore.GREEN) | |
| subprocess.call([activate_venv_command(), str(script)]) | |
| else: | |
| print_and_log("ℹ️ لا يوجد سكربت إضافي للتشغيل.", Fore.BLUE) | |
| def main(): | |
| print_and_log("⚙️ تشغيل Smart Installer...", Fore.MAGENTA) | |
| print_and_log(f"🖥️ نظام التشغيل: {platform.system()} {platform.release()}", Fore.CYAN) | |
| if not check_internet(): | |
| print_and_log("❌ لا يوجد اتصال بالإنترنت!", Fore.RED) | |
| return | |
| try: | |
| create_virtual_env() | |
| python_exec = activate_venv_command() | |
| install_requirements(python_exec) | |
| run_post_install_script() | |
| print_and_log("✅ تم التثبيت بنجاح!", Fore.GREEN) | |
| except subprocess.CalledProcessError as e: | |
| print_and_log(f"💥 خطأ أثناء تنفيذ أمر: {e}", Fore.RED) | |
| except Exception as ex: | |
| print_and_log(f"🚨 استثناء غير متوقع: {ex}", Fore.RED) | |
| if __name__ == "__main__": | |
| main() | |