Spaces:
Build error
Build error
File size: 579 Bytes
7eaaeb1 8f3aa9e 4714054 464d17b 4714054 7eaaeb1 4714054 7eaaeb1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | import os
import subprocess
from huggingface_hub import hf_hub_download
MODEL_REPO = "gustajunq/OpenFable-4B-GGUF"
MODEL_FILE = "openfable-4b-q4_k_m.gguf"
MODEL_ALIAS = "openfable"
print("Baixando modelo...")
model_path = hf_hub_download(
repo_id=MODEL_REPO,
filename=MODEL_FILE,
)
print("Modelo:", model_path)
cmd = [
"python",
"-m",
"llama_cpp.server",
"--model",
model_path,
"--model_alias",
MODEL_ALIAS,
"--host",
"0.0.0.0",
"--port",
"7860",
]
print("Iniciando servidor...")
print(" ".join(cmd))
subprocess.run(cmd) |