Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,10 @@ import gradio as gr
|
|
6 |
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
7 |
|
8 |
# Función para formatear el prompt con historial
|
9 |
-
def format_prompt(message, history, system_prompt=
|
|
|
|
|
|
|
10 |
prompt = "<s>"
|
11 |
for user_prompt, bot_response in history:
|
12 |
prompt += f"[INST] {user_prompt} [/INST]"
|
|
|
6 |
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
7 |
|
8 |
# Función para formatear el prompt con historial
|
9 |
+
def format_prompt(message, history, system_prompt=None):
|
10 |
+
if system_prompt is None:
|
11 |
+
system_prompt ="Experto en servicios de abastecimiento, depuracion, reutilizacion y calidad del agua, para la empresa Canal de Isabel II"):
|
12 |
+
|
13 |
prompt = "<s>"
|
14 |
for user_prompt, bot_response in history:
|
15 |
prompt += f"[INST] {user_prompt} [/INST]"
|