Skip to content

Samuser1/testingRAG

Repository files navigation

🎙️ Persona Interview Simulator

A Streamlit app that creates an AI persona based on interview transcripts, allowing you to have conversations with the interviewee.

🚀 Quick Start

  1. Install dependencies:

    pip install -r requirements.txt
  2. Set up environment variables: Copy the example environment file and add your API keys:

    cp .env.example .env

    Then edit .env and replace the placeholder values with your actual API keys:

    OPENROUTER_API_KEY=your_openrouter_api_key_here
    PINECONE_API_KEY=your_pinecone_api_key_here
    COHERE_API_KEY=your_cohere_api_key_here
    
  3. Run the app:

    streamlit run app.py
  4. Initialize the system:

    • The app will show a simple "Initialize AI System" button
    • Click it to start the RAG setup process
    • Watch the progress as it loads the transcript, creates embeddings, and sets up the database
    • Once complete, you can start chatting with the AI persona

🔑 Getting API Keys

  • OpenRouter API Key: Sign up at openrouter.ai to get access to GPT-4 and other models
  • Pinecone API Key: Sign up at pinecone.io for vector database storage
  • Cohere API Key: Sign up at cohere.ai for better embeddings (optional)

📁 Files

  • app.py - Main Streamlit application
  • pilot.py - Backend logic for persona creation and Q&A
  • interview.pdf - Interview transcript to create the persona from
  • requirements.txt - Python dependencies

🎯 Features

  • Creates an AI persona from interview transcripts
  • Interactive chat interface with modern UI
  • On-demand RAG system initialization - no more slow loading!
  • Real-time progress tracking during system setup
  • Cohere AI embeddings for better semantic search
  • Persistent conversation history
  • Error handling and user feedback
  • Responsive design

🔒 Security Notes

  • Never commit your .env file - it contains sensitive API keys
  • The .env file is already in .gitignore to prevent accidental commits
  • Use .env.example as a template for your environment variables
  • If you accidentally commit API keys, immediately rotate them in your service accounts

🐛 Troubleshooting

If you see a blank page:

  1. Check that all required API keys are set in your .env file
  2. Ensure you have an active internet connection
  3. Verify that interview.pdf exists in the project directory
  4. Check the terminal for any error messages

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages