Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,15 @@
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
3 |
-
from
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
"""
|
6 |
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
|
@@ -30,7 +39,7 @@ def respond(
|
|
30 |
|
31 |
response = ""
|
32 |
|
33 |
-
for message in
|
34 |
messages,
|
35 |
max_tokens=max_tokens,
|
36 |
stream=True,
|
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
3 |
+
from llama_cpp import Llama
|
4 |
+
|
5 |
+
llm = Llama.from_pretrained(
|
6 |
+
repo_id="eybro/model",
|
7 |
+
filename="unsloth.Q8_0.gguf",
|
8 |
+
)
|
9 |
+
|
10 |
+
llm.create_chat_completion(
|
11 |
+
messages = "No input example has been defined for this model task."
|
12 |
+
)
|
13 |
|
14 |
"""
|
15 |
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
|
|
|
39 |
|
40 |
response = ""
|
41 |
|
42 |
+
for message in llm.create_chat_completion(
|
43 |
messages,
|
44 |
max_tokens=max_tokens,
|
45 |
stream=True,
|