uumerrr684 commited on
Commit
1e5d194
Β·
verified Β·
1 Parent(s): 622f9de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -13
app.py CHANGED
@@ -13,7 +13,7 @@ from git import Repo
13
 
14
  # Page configuration
15
  st.set_page_config(
16
- page_title="RAG Chat Flow πŸ“š",
17
  page_icon="πŸ“š",
18
  initial_sidebar_state="expanded"
19
  )
@@ -518,12 +518,13 @@ Instructions:
518
  - Use the document information as your foundation
519
  - Expand with logical personality traits and qualities someone like this would have
520
  - Add 3-4 additional lines of thoughtful insights about their character
521
- - Use relevant emojis to make the response warm and engaging
522
  - Write in a caring, family-friend tone
523
  - If someone asks about relationships (like "mother" = "mama"), make those connections
524
  - Make the response feel personal and detailed, not just a basic fact
525
  - Include both strengths and endearing qualities
526
  - Keep it warm but informative (4-6 sentences total)
 
527
 
528
  Remember: You're helping someone learn about their family members in a meaningful way! πŸ’"""
529
  max_tokens = 400 # Increased for richer responses
@@ -534,7 +535,7 @@ Remember: You're helping someone learn about their family members in a meaningfu
534
 
535
  Question: {query}
536
 
537
- Give a warm, detailed answer with emojis. Add 2-3 more qualities this person likely has. Make it caring and personal! πŸ’"""
538
  max_tokens = 150 # Better than 50 for family context
539
  temperature = 0.2
540
 
@@ -736,7 +737,7 @@ if "session_id" not in st.session_state:
736
  rag_system = initialize_rag_system()
737
 
738
  # Header
739
- st.title("RAG Chat Flow πŸ“š")
740
  st.caption("Ask questions about your documents with AI-powered retrieval")
741
 
742
  # Sidebar
@@ -810,15 +811,8 @@ with st.sidebar:
810
  else:
811
  st.error("Failed to index documents. Check your documents folder.")
812
 
813
- # Show current documents (optional - can be hidden for privacy)
814
- if st.checkbox("πŸ“„ Show Document List", value=False, help="Show/hide document filenames"):
815
- if os.path.exists("documents"):
816
- txt_files = [f for f in os.listdir("documents") if f.endswith('.txt')]
817
- if txt_files:
818
- st.subheader("πŸ“„ Current Documents")
819
- for file in txt_files:
820
- st.text(f"β€’ {file}")
821
- elif os.path.exists("documents"):
822
  txt_files = [f for f in os.listdir("documents") if f.endswith('.txt')]
823
  if txt_files:
824
  st.info(f"πŸ“„ {len(txt_files)} family profile documents loaded (hidden for privacy)")
 
13
 
14
  # Page configuration
15
  st.set_page_config(
16
+ page_title="RAG Chat Flow βœ©β‚ŠΛš.β‹†πŸ•ΈοΈβ‹†βΊβ‚Šβœ§ ",
17
  page_icon="πŸ“š",
18
  initial_sidebar_state="expanded"
19
  )
 
518
  - Use the document information as your foundation
519
  - Expand with logical personality traits and qualities someone like this would have
520
  - Add 3-4 additional lines of thoughtful insights about their character
521
+ - Use 3-4 relevant emojis throughout the response to make it warm and engaging
522
  - Write in a caring, family-friend tone
523
  - If someone asks about relationships (like "mother" = "mama"), make those connections
524
  - Make the response feel personal and detailed, not just a basic fact
525
  - Include both strengths and endearing qualities
526
  - Keep it warm but informative (4-6 sentences total)
527
+ - Sprinkle emojis naturally throughout, not just at the end
528
 
529
  Remember: You're helping someone learn about their family members in a meaningful way! πŸ’"""
530
  max_tokens = 400 # Increased for richer responses
 
535
 
536
  Question: {query}
537
 
538
+ Give a warm, detailed answer with 3-4 emojis spread throughout. Add 2-3 more qualities this person likely has. Make it caring and personal! πŸ’"""
539
  max_tokens = 150 # Better than 50 for family context
540
  temperature = 0.2
541
 
 
737
  rag_system = initialize_rag_system()
738
 
739
  # Header
740
+ st.title("RAG Chat Flow βœ©β‚ŠΛš.β‹†πŸ•ΈοΈβ‹†βΊβ‚Šβœ§")
741
  st.caption("Ask questions about your documents with AI-powered retrieval")
742
 
743
  # Sidebar
 
811
  else:
812
  st.error("Failed to index documents. Check your documents folder.")
813
 
814
+ # Show document count only (hidden for privacy)
815
+ if os.path.exists("documents"):
 
 
 
 
 
 
 
816
  txt_files = [f for f in os.listdir("documents") if f.endswith('.txt')]
817
  if txt_files:
818
  st.info(f"πŸ“„ {len(txt_files)} family profile documents loaded (hidden for privacy)")