Leonydis137 commited on
Commit
20c64a1
·
verified ·
1 Parent(s): ecfc011

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -40,8 +40,11 @@ model_path = hf_hub_download(
40
  print(f"✅ Downloaded GGUF model to: {model_path}")
41
 
42
  # Load via ctransformers
43
- # ctransformers' constructor takes the GGUF path as the first positional argument
44
- llm = AutoModelForCausalLM(model_path, model_type="llama")
 
 
 
45
 
46
  # ---------------- Generation Helper ----------------
47
  def generate_text(prompt: str) -> str:
 
40
  print(f"✅ Downloaded GGUF model to: {model_path}")
41
 
42
  # Load via ctransformers
43
+ # Use the from_pretrained class method for ctransformers
44
+ llm = AutoModelForCausalLM.from_pretrained(
45
+ model_path,
46
+ model_type="llama"
47
+ )
48
 
49
  # ---------------- Generation Helper ----------------
50
  def generate_text(prompt: str) -> str: