Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -40,10 +40,8 @@ model_path = hf_hub_download(
|
|
40 |
print(f"✅ Downloaded GGUF model to: {model_path}")
|
41 |
|
42 |
# Load via ctransformers
|
43 |
-
|
44 |
-
|
45 |
-
model_type="llama"
|
46 |
-
)
|
47 |
|
48 |
# ---------------- Generation Helper ----------------
|
49 |
def generate_text(prompt: str) -> str:
|
|
|
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:
|