updates
Browse files
app.py
CHANGED
|
@@ -2,17 +2,15 @@ import gradio as gr
|
|
| 2 |
from llama_cpp import Llama
|
| 3 |
from huggingface_hub import hf_hub_download
|
| 4 |
|
| 5 |
-
# ✅ Download GGUF file
|
| 6 |
model_path = hf_hub_download(
|
| 7 |
repo_id="jerinaj/lfm-tool",
|
| 8 |
-
filename="
|
| 9 |
)
|
| 10 |
|
| 11 |
-
# ✅ Load model
|
| 12 |
llm = Llama(
|
| 13 |
model_path=model_path,
|
| 14 |
-
n_ctx=
|
| 15 |
-
n_threads=
|
| 16 |
)
|
| 17 |
|
| 18 |
def chat(prompt):
|
|
|
|
| 2 |
from llama_cpp import Llama
|
| 3 |
from huggingface_hub import hf_hub_download
|
| 4 |
|
|
|
|
| 5 |
model_path = hf_hub_download(
|
| 6 |
repo_id="jerinaj/lfm-tool",
|
| 7 |
+
filename="LFM2-350M.Q4_K_M.gguf"
|
| 8 |
)
|
| 9 |
|
|
|
|
| 10 |
llm = Llama(
|
| 11 |
model_path=model_path,
|
| 12 |
+
n_ctx=1024,
|
| 13 |
+
n_threads=2
|
| 14 |
)
|
| 15 |
|
| 16 |
def chat(prompt):
|