alphayomega commited on
Commit
ef50c4f
1 Parent(s): e1c2152

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
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 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,6 +39,10 @@ class ConversationalAI:
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,
@@ -50,4 +54,4 @@ if __name__ == "__main__":
50
  ai = ConversationalAI()
51
  demo = ai.create_chat_interface()
52
  demo.queue()
53
- demo.launch()
 
9
  self.client = Groq()
10
  self.system_prompt = {
11
  "role": "system",
12
+ "content": "# eres un amable chatbot. "
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
+ # Añadir título y texto adicional
43
+ gr.Markdown("# Bot de Marketing")
44
+ gr.Markdown("### Más información al WhatsApp: [wa.me/51927929109](https://wa.me/51927929109)")
45
+
46
  gr.ChatInterface(self.chat_groq,
47
  clear_btn=None,
48
  undo_btn=None,
 
54
  ai = ConversationalAI()
55
  demo = ai.create_chat_interface()
56
  demo.queue()
57
+ demo.launch()