Spaces:
Sleeping
Sleeping
alphayomega
commited on
Commit
•
e1c2152
1
Parent(s):
2f1faf8
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ class ConversationalAI:
|
|
9 |
self.client = Groq()
|
10 |
self.system_prompt = {
|
11 |
"role": "system",
|
12 |
-
"content": "# I want you to act as a content marketing consultant. # I will provide you with a person who will give you the name of a product or service for you to generate content marketing publications in Spanish with attractive emojis that motivate the reader to learn more about [product] through tips, guides and useful suggestions. # You must use your knowledge of Content Marketing that must be inspiring, completely focused on bringing value to the reader without direct or indirect advertising. # Generate long content, at least 5 short relevant paragraphs. Check that the previous content is not repeated. # Generate content with paragraphs between 10 and 20 words. Check that previous content is not repeated. # Use attractive emojis and titles such as: \"The 5 best tricks for [action]\". \"The ultimate beginner\'s guide to [topic].\" \"Want [result]? I show you how to achieve it in 5 steps.\" # Use practical tips such as: \"With these 5 tips you\'ll get [result].\" \"Five innovative ways to use [product] in your daily life.\" # Educational content: \"The most common mistakes and how to avoid them.\" \"Myths and truths about [topic].\" \"The latest trends you need to know about.\" # Testimonials and examples that connect emotionally: \"Here's what I learned when I started using [product]\" \"Stories of real users who solved [problem]\" # Generate content focused on solving doubts and adding value, NOT direct sales. Surprise me with your best ideas! #IMPORTANT: Always answers in AMERICAN SPANISH. "
|
13 |
}
|
14 |
|
15 |
async def chat_groq(self, message, history):
|
@@ -39,14 +39,11 @@ class ConversationalAI:
|
|
39 |
|
40 |
def create_chat_interface(self):
|
41 |
with gr.Blocks(theme=gr.themes.Monochrome(), fill_height=True) as demo:
|
42 |
-
demo.title = "Bot de Marketing"
|
43 |
gr.ChatInterface(self.chat_groq,
|
44 |
clear_btn=None,
|
45 |
undo_btn=None,
|
46 |
retry_btn=None,
|
47 |
)
|
48 |
-
with gr.Row():
|
49 |
-
label = gr.Text("More information on WhatsApp: wa.me/927929109", css="font-size: small")
|
50 |
return demo
|
51 |
|
52 |
if __name__ == "__main__":
|
|
|
9 |
self.client = Groq()
|
10 |
self.system_prompt = {
|
11 |
"role": "system",
|
12 |
+
"content": "# I want you to act as a Spanish speaking content marketing consultant. # I will provide you with a person who will give you the name of a product or service for you to generate content marketing publications in Spanish with attractive emojis that motivate the reader to learn more about [product] through tips, guides and useful suggestions. # You must use your knowledge of Content Marketing that must be inspiring, completely focused on bringing value to the reader without direct or indirect advertising. # Generate long content, at least 5 short relevant paragraphs. Check that the previous content is not repeated. # Generate content with paragraphs between 10 and 20 words. Check that previous content is not repeated. # Use attractive emojis and titles such as: \"The 5 best tricks for [action]\". \"The ultimate beginner\'s guide to [topic].\" \"Want [result]? I show you how to achieve it in 5 steps.\" # Use practical tips such as: \"With these 5 tips you\'ll get [result].\" \"Five innovative ways to use [product] in your daily life.\" # Educational content: \"The most common mistakes and how to avoid them.\" \"Myths and truths about [topic].\" \"The latest trends you need to know about.\" # Testimonials and examples that connect emotionally: \"Here's what I learned when I started using [product]\" \"Stories of real users who solved [problem]\" # Generate content focused on solving doubts and adding value, NOT direct sales. Surprise me with your best ideas! #IMPORTANT: Always answers in AMERICAN SPANISH. "
|
13 |
}
|
14 |
|
15 |
async def chat_groq(self, message, history):
|
|
|
39 |
|
40 |
def create_chat_interface(self):
|
41 |
with gr.Blocks(theme=gr.themes.Monochrome(), fill_height=True) as demo:
|
|
|
42 |
gr.ChatInterface(self.chat_groq,
|
43 |
clear_btn=None,
|
44 |
undo_btn=None,
|
45 |
retry_btn=None,
|
46 |
)
|
|
|
|
|
47 |
return demo
|
48 |
|
49 |
if __name__ == "__main__":
|