Commit
·
6e234f4
1
Parent(s):
49d2c83
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,8 +8,8 @@ from huggingface_hub import hf_hub_download
|
|
| 8 |
|
| 9 |
llm = Llama(
|
| 10 |
model_path=hf_hub_download(
|
| 11 |
-
repo_id="
|
| 12 |
-
filename="
|
| 13 |
),
|
| 14 |
n_ctx=4086,
|
| 15 |
)
|
|
@@ -18,7 +18,7 @@ history = []
|
|
| 18 |
|
| 19 |
def generate_text(message, history):
|
| 20 |
temp = ""
|
| 21 |
-
input_prompt = "Conversazione tra umano ed un assistente AI di nome
|
| 22 |
for interaction in history:
|
| 23 |
input_prompt += "[|Umano|] " + interaction[0] + "\n"
|
| 24 |
input_prompt += "[|Assistente|]" + interaction[1]
|
|
@@ -50,8 +50,8 @@ def generate_text(message, history):
|
|
| 50 |
|
| 51 |
demo = gr.ChatInterface(
|
| 52 |
generate_text,
|
| 53 |
-
title="
|
| 54 |
-
description="This is a quantized version of
|
| 55 |
examples=[
|
| 56 |
"Dammi 3 idee di ricette che posso fare con i pistacchi",
|
| 57 |
"Prepara un piano di esercizi da poter fare a casa",
|
|
|
|
| 8 |
|
| 9 |
llm = Llama(
|
| 10 |
model_path=hf_hub_download(
|
| 11 |
+
repo_id="FinancialSupport/saiga-7b-gguf",
|
| 12 |
+
filename="saiga-7b.Q4_K_M.gguf",
|
| 13 |
),
|
| 14 |
n_ctx=4086,
|
| 15 |
)
|
|
|
|
| 18 |
|
| 19 |
def generate_text(message, history):
|
| 20 |
temp = ""
|
| 21 |
+
input_prompt = "Conversazione tra umano ed un assistente AI di nome saiaga-7b\n"
|
| 22 |
for interaction in history:
|
| 23 |
input_prompt += "[|Umano|] " + interaction[0] + "\n"
|
| 24 |
input_prompt += "[|Assistente|]" + interaction[1]
|
|
|
|
| 50 |
|
| 51 |
demo = gr.ChatInterface(
|
| 52 |
generate_text,
|
| 53 |
+
title="saiga-7b running on CPU (quantized Q4_K)",
|
| 54 |
+
description="This is a quantized version of saiga-7b running on CPU (very slow). It is less powerful than the original version, but it can even run on the free tier of huggingface.",
|
| 55 |
examples=[
|
| 56 |
"Dammi 3 idee di ricette che posso fare con i pistacchi",
|
| 57 |
"Prepara un piano di esercizi da poter fare a casa",
|