Rabbit-Innotech commited on
Commit
fc11b6b
·
verified ·
1 Parent(s): 7338113

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -14
app.py CHANGED
@@ -317,27 +317,19 @@ body {
317
  }
318
  """
319
 
320
- # Generate a dynamic welcome message using the LLM
321
  def generate_welcome_message():
322
  welcome_prompt = """
323
- Generate a warm, friendly welcome message for a chatbot that focuses on helping users
324
- find information about Gender-Based Violence Resources in Rwanda. The message should:
325
-
326
- 1. Introduce the chatbot's purpose clearly
327
- 2. Be empathetic and supportive given the sensitive nature of the topic
328
- 3. Encourage the user to ask questions
329
- 4. Include 1-2 examples of questions they could ask
330
- 5. Use a warm, friendly tone with 1-2 appropriate emojis
331
- 6. Be concise (3-5 sentences)
332
-
333
- Your welcome message:
334
  """
335
 
336
  # Get the welcome message from the LLM
337
  welcome_message = llm.invoke(welcome_prompt).content
338
  return welcome_message
339
 
340
- # Create dynamic welcome message
341
  welcome_msg = generate_welcome_message()
342
 
343
  # Create the Chat Interface with welcome message
@@ -347,7 +339,6 @@ demo = gr.ChatInterface(
347
  fill_height=True,
348
  theme="soft",
349
  css=custom_css, # Apply the custom CSS
350
- examples=["What services does Haguruka offer?", "How can I report a case of GBV?"],
351
  description=welcome_msg
352
  )
353
 
 
317
  }
318
  """
319
 
320
+ # Generate a simple welcome message using the LLM
321
  def generate_welcome_message():
322
  welcome_prompt = """
323
+ Create a short, simple welcome message for a chatbot about Gender-Based Violence Resources in Rwanda.
324
+ Keep it under 3 sentences, use simple language, and include one emoji.
325
+ Make it warm and supportive but direct and easy to read.
 
 
 
 
 
 
 
 
326
  """
327
 
328
  # Get the welcome message from the LLM
329
  welcome_message = llm.invoke(welcome_prompt).content
330
  return welcome_message
331
 
332
+ # Create simple welcome message
333
  welcome_msg = generate_welcome_message()
334
 
335
  # Create the Chat Interface with welcome message
 
339
  fill_height=True,
340
  theme="soft",
341
  css=custom_css, # Apply the custom CSS
 
342
  description=welcome_msg
343
  )
344