Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
#
|
44 |
-
llm = AutoModelForCausalLM(
|
|
|
|
|
|
|
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:
|