Spaces:
Sleeping
Sleeping
alphayomega
commited on
Commit
•
ad7ff8e
1
Parent(s):
a5c8366
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import gradio as gr
|
|
4 |
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
5 |
|
6 |
def format_prompt(message, history):
|
7 |
-
prompt = "<s>[INST] #
|
8 |
for user_prompt, bot_response in history:
|
9 |
prompt += f"[INST] {user_prompt} [/INST]"
|
10 |
prompt += f" {bot_response}</s> "
|
@@ -44,9 +44,9 @@ mychatbot = gr.Chatbot(
|
|
44 |
|
45 |
demo = gr.ChatInterface(fn=generate,
|
46 |
chatbot=mychatbot,
|
47 |
-
title="Bot con I.A. para crear
|
48 |
-
description="<p style='line-height:
|
49 |
-
"<p style='line-height: 0.
|
50 |
" <a href='https://alphayomega-bot-mc.hf.space'>Marketing de Contenidos |</a> "+
|
51 |
" <a href='https://alphayomega-bot-dp.hf.space'> Descripcion de Productos |</a>"+
|
52 |
" <a href='https://alphayomega-bot-cp.hf.space'> Caracteristicas de Productos |</a> "+
|
|
|
4 |
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
5 |
|
6 |
def format_prompt(message, history):
|
7 |
+
prompt = "<s>[INST] # Extract the benefits of the product, not the features. # You should be as brief as possible. # Omit the price, if any. # Do not mention the name of the product. # Use several paragraphs. # Try to synthesize or summarize. # Focus only on the benefits. # Highlight how this product helps the customer. # Always respond in Spanish. # The text you create will be used in an e-commerce product sales page through the Internet, so it must be persuasive, attractive, and above all very short and summarized. # Remember to keep the text short, summarized, synthesized in three paragraphs. # You must deliver the text in HTML code to paste it in wordpress, use page breaks. # Please provide the code using a Markdown code block (fence syntax), to copy. # Please provide the code using a Markdown code block (fence syntax), to copy. # Surprise me with your best ideas! # Always answers in AMERICAN SPANISH. Stop after finish the first content marketing genreated. [/INST]</s>"
|
8 |
for user_prompt, bot_response in history:
|
9 |
prompt += f"[INST] {user_prompt} [/INST]"
|
10 |
prompt += f" {bot_response}</s> "
|
|
|
44 |
|
45 |
demo = gr.ChatInterface(fn=generate,
|
46 |
chatbot=mychatbot,
|
47 |
+
title="Bot con I.A. para crear BENEFICIOS de productos.</p>",
|
48 |
+
description="<p style='line-height: 1'>Estos BENEFICIOS van en la descripcion LARGA de producto (En la parte de ARRIBA).</p><br>"+
|
49 |
+
"<p style='line-height: 0.1'>Si desea usar otro BOT de I.A. escoja:</p>"+
|
50 |
" <a href='https://alphayomega-bot-mc.hf.space'>Marketing de Contenidos |</a> "+
|
51 |
" <a href='https://alphayomega-bot-dp.hf.space'> Descripcion de Productos |</a>"+
|
52 |
" <a href='https://alphayomega-bot-cp.hf.space'> Caracteristicas de Productos |</a> "+
|