Spaces:
Sleeping
Sleeping
Commit
·
8100cb2
1
Parent(s):
f2df5a6
update model
Browse files
app.py
CHANGED
@@ -1,15 +1,22 @@
|
|
1 |
import gradio as gr
|
2 |
from llama_cpp import Llama
|
3 |
-
from huggingface_hub import
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
def respond(
|
15 |
message,
|
|
|
1 |
import gradio as gr
|
2 |
from llama_cpp import Llama
|
3 |
+
from huggingface_hub import hf_hub_download
|
4 |
|
5 |
+
# Download the file from Hugging Face
|
6 |
+
model_path = hf_hub_download(repo_id="rcarioniporras/model", filename="unsloth.Q4_K_M.gguf")
|
7 |
+
|
8 |
+
# Load the model using llama_cpp
|
9 |
+
llm = Llama(model_path=model_path, verbose=False)
|
10 |
+
|
11 |
+
|
12 |
+
# """
|
13 |
+
# For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
14 |
+
# """
|
15 |
+
# llm = Llama.from_pretrained(
|
16 |
+
# repo_id="rcarioniporras/model",
|
17 |
+
# filename="*Q4_K_M.gguf",
|
18 |
+
# verbose=False
|
19 |
+
# )
|
20 |
|
21 |
def respond(
|
22 |
message,
|