Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,11 +3,8 @@ from llama_cpp import Llama
|
|
| 3 |
|
| 4 |
llm = Llama(model_path="model.gguf", n_ctx=8000, n_threads=2, chat_format="chatml")
|
| 5 |
|
| 6 |
-
def generate(message, history,temperature=0.
|
| 7 |
-
system_prompt = """You are an advanced artificial intelligence assistant
|
| 8 |
-
You are a emerged as a fusion of many models, making you exceptionally intelligent.You are a very empathetic assistant and very attentive to every word.
|
| 9 |
-
You always think and reason step by step.
|
| 10 |
-
Your role is to give clear and precise answers."""
|
| 11 |
formatted_prompt = [{"role": "system", "content": system_prompt}]
|
| 12 |
for user_prompt, bot_response in history:
|
| 13 |
formatted_prompt.append({"role": "user", "content": user_prompt})
|
|
|
|
| 3 |
|
| 4 |
llm = Llama(model_path="model.gguf", n_ctx=8000, n_threads=2, chat_format="chatml")
|
| 5 |
|
| 6 |
+
def generate(message, history, do_sample=True, temperature=0.7,max_tokens=800, top_p=0.9):
|
| 7 |
+
system_prompt = """You are an advanced artificial intelligence assistant. Your role is to give clear and precise answers."""
|
|
|
|
|
|
|
|
|
|
| 8 |
formatted_prompt = [{"role": "system", "content": system_prompt}]
|
| 9 |
for user_prompt, bot_response in history:
|
| 10 |
formatted_prompt.append({"role": "user", "content": user_prompt})
|