Wajahat698 commited on
Commit
a981823
·
verified ·
1 Parent(s): bab520d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +58 -13
app.py CHANGED
@@ -439,6 +439,53 @@ if not st.session_state.get("chat_started", False):
439
  """, unsafe_allow_html=True)
440
 
441
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
442
 
443
 
444
 
@@ -460,22 +507,25 @@ if prompt :
460
  try:
461
  # Generate response using the agent executor
462
  output = agent_executor.invoke({
463
- "input": f"{prompt}Be specific with numbers, dates, people, and dollar amount.Search and Provide sources of all the results . Respond directly to the query without any introductory phrases or meta-commentary. Your response should be natural and read as if it's addressing the query immediately, without any preamble. Create Creative Headlines using main Trust Bucket targeted always use active language like 'Lets dicover'or 'Watch it grow' etc. ALways give space between your words properly. ",
464
-
 
 
 
 
465
  "chat_history": st.session_state.chat_history
466
  })
467
  full_response = output["output"]
468
 
469
 
470
  # Display the response
 
 
 
 
471
  st.write(full_response, unsafe_allow_html=True)
472
 
473
- follow_up_output = agent_executor.invoke({
474
- "input": f"Extract 1-2 follow-up questions from the following text: {full_response}",
475
- "chat_history": st.session_state.chat_history
476
- })
477
- follow_up_questions = follow_up_output["output"]
478
- st.session_state.follow_up_questions = follow_up_questions
479
 
480
 
481
 
@@ -490,8 +540,3 @@ if prompt :
490
 
491
 
492
 
493
- if st.session_state.get("follow_up_questions"):
494
- st.markdown("Follow-up questions:")
495
- st.markdown(st.session_state.follow_up_questions, unsafe_allow_html=True)
496
- # Clear follow-up questions for the next iteration
497
- st.session_state.follow_up_questions = None
 
439
  """, unsafe_allow_html=True)
440
 
441
 
442
+ trust_tips = [
443
+ "What I don’t know I can’t trust you for. Make sure you know all your great TrustBuilders® and use them over time.",
444
+ "The more specific, the more trustworthy each TrustBuilder® is.",
445
+ "For TrustBuilders®, think about each Trust Bucket® and in each one organization, product, and key individuals.",
446
+ "You are infinitely trustworthy. Organization, products, and your people. In each Trust Bucket® and past, present, and future.",
447
+ "Some TrustBuilders® are enduring (we have over 3 million clients), others changing (we are ranked No. 1 for 8 years/9 years), and yet others short-lived (we will present at XYZ conference next month).",
448
+ "Not all Trust Buckets® are equally important all the time. Think about which ones are most important right now and how to fill them (with TrustAnalyser® you know).",
449
+ "In social media, structure posts over time to focus on different Trust Buckets® and themes within them.",
450
+ "Try focusing your idea on specific Trust Buckets® or a mix of them.",
451
+ "Within each Trust Bucket®, ask for examples across different themes like employee programs, IT, R&D.",
452
+ "To create more and different trust, ask trustifier.ai to combine seemingly unconnected aspects like 'I played in bands all my youth. What does this add to my competence as a lawyer?'",
453
+ "With every little bit more trust, your opportunity doubles. It's about using trustifier.ai to help you nudge trust up ever so slightly in everything you do.",
454
+ "Being honest is not enough. You can be honest with one aspect and destroy trust and build a lot of trust with another. Define what that is.",
455
+ "The more I trust you, the more likely I am to recommend you. And that's much easier with specifics.",
456
+ "What others don’t say they are not trusted for - but you can claim that trust.",
457
+ "Building more trust is a service to your audience. It's so valuable to us, as humans, that we reflect that value right away in our behaviors.",
458
+ "In your audience journey, you can use TrustAnalyser® to know precisely which Trust Buckets® and TrustBuilders® are most effective at each stage of the journey.",
459
+ "Try structuring a document. Like % use of each Trust Bucket® and different orders in the document.",
460
+ "In longer documents like proposals, think about the chapter structure and which Trust Buckets® and TrustBuilders® you want to focus on when.",
461
+ "Building Trust doesn’t take a long time. Trust is built and destroyed every second, with every word, action, and impression. That's why it's so important to build more trust all the time.",
462
+ "There is no prize for the second most trusted. To get the most business, support, and recognition, you have to be the most trusted.",
463
+ "With most clients, we know they don’t know 90% of their available TrustBuilders®. Knowing them increases internal trust - and that can be carried to the outside.",
464
+ "Our client data always shows that, after price, trust is the key decision factor (and price is a part of benefit and relationship trust).",
465
+ "Our client data shows that customer value increases 9x times from Trust Neutral to High Trust. A good reason for internal discussions.",
466
+ "Our client's data shows that high trust customers are consistently far more valuable than just trusting ones.",
467
+ "Trust determines up to 85% of your NPS. No wonder, because the more I trust you, the more likely I am to recommend you.",
468
+ "Trust determines up to 75% of your loyalty. Think about it yourself. It's intuitive.",
469
+ "Trust determines up to 87% of your reputation. Effectively, they are one and the same.",
470
+ "Trust determines up to 85% of your employee engagement. But what is it that they want to trust you for?",
471
+ "Don't just ask 'what your audience needs to trust for'. That just keeps you at low, hygiene trust levels. Ask what they 'would love to trust for'. That's what gets you to High Trust."
472
+ ]
473
+
474
+ suggestions = [
475
+ "Try digging deeper into a specific TrustBuilder®.",
476
+ "Ask just for organization, product, or a person's TrustBuilders® for a specific Trust Bucket®.",
477
+ "Some TrustBuilders® can fill more than one Trust Bucket®. We call these PowerBuilders. TrustAnalyser® reveals them for you.",
478
+ "Building trust is storytelling. trustifier.ai connects Trust Buckets® and TrustBuilders® for you. But you can push it more to connect specific Trust Buckets® and TrustBuilders®.",
479
+ "Describe your audience and ask trustifier.ai to choose the most relevant Trust Buckets®, TrustBuilders®, and tonality (TrustAnalyser® can do this precisely for you).",
480
+ "Ask trustifier.ai to find TrustBuilders® for yourself. Then correct and add a few for your focus Trust Buckets® - and generate a profile or CV.",
481
+ "LinkedIn Profiles are at their most powerful if they are regularly updated and focused on your objectives. Rewrite it every 2-3 months using different Trust Buckets®.",
482
+ "Share more of your TrustBuilders® with others and get them to help you build your trust.",
483
+ "Build a trust strategy. Ask trustifier.ai to find all your TrustBuilders® in the Trust Buckets® and then create a trust-building program for a specific person/audience over 8 weeks focusing on different Trust Buckets® that build on one another over time. Then refine and develop by channel ideas.",
484
+ "Brief your own TrustBuilders® and ask trustifier.ai to tell you which Trust Buckets® they're likely to fill (some can fill more than one).",
485
+ "Have some fun. Ask trustifier.ai to write a 200-word speech to investors using all Trust Buckets®, but leading and ending with Development Trust. Use [BRAND], product, and personal CEO [NAME] TrustBuilders®.",
486
+ "Ask why TrustLogic® can be trusted in each Trust Bucket®.",
487
+ "Ask what's behind TrustLogic®."
488
+ ]
489
 
490
 
491
 
 
507
  try:
508
  # Generate response using the agent executor
509
  output = agent_executor.invoke({
510
+ "input": f"{prompt} Be specific with numbers, dates, people, and dollar amounts. "
511
+ "Search and provide sources for all the results. Respond directly to the query without any introductory phrases "
512
+ "or meta-commentary. Your response should be natural and read as if it's addressing the query immediately, "
513
+ "without any preamble. Use creative techniques like metaphors, analogies, and juxtaposition to enhance the content. "
514
+ "Interconnect ideas smoothly to create meaning for the reader.",
515
+ "Write it as nicely flowing text and Create an active language headline. Not use colons in the sub-headers and use a creative technique in every headline and sub-header. Interweave the examples contextually and create the meaning for donors and beneficiaries.",
516
  "chat_history": st.session_state.chat_history
517
  })
518
  full_response = output["output"]
519
 
520
 
521
  # Display the response
522
+ trust_tip = random.choice(trust_tips)
523
+ suggestion = random.choice(suggestions)
524
+ full_response += f"\n\n**Trust Tip**: {trust_tip}\n**Suggestion**: {suggestion}"
525
+
526
  st.write(full_response, unsafe_allow_html=True)
527
 
528
+
 
 
 
 
 
529
 
530
 
531
 
 
540
 
541
 
542