A Streamlit app that allows users to upload PDF files and ask questions about the content using Google’s Generative AI. The system extracts text from PDFs, creates embeddings, and performs similarity searches using FAISS to deliver detailed answers based on PDF context.
• Upload multiple PDF files.
• Extract and split PDF text into chunks.
• Build FAISS vector storage for efficient similarity search.
• Query the PDF content with AI-powered Q&A functionality.
• Responsive web app with user-friendly interface.
Below is the architecture diagram outlining the core flow of the system:
📂 Chat-with-PDF-Document-using-GenAI
│
├── 📄 requirements.txt # Python dependencies
├── 📄 app.py # Streamlit application file
├── 📄 config.py # Core logic for PDF processing & embedding
├── 📄 .env # API key configuration
├── 📂 faiss_index/ # Stores FAISS index files (index.faiss, index.pkl)
├── 🖼 logo.jpg # Logo for app's UI
├── 🖼 UI Deployment.png # Image showing app deployment
git clone https://github.com/your-repo/Chat-with-PDF-Document-using-GenAI.git
cd Chat-with-PDF-Document-using-GenAI
pip install -r requirements.txt
• Create a .env file and add your Google API Key:
GOOGLE_API_KEY = "Your_Google_API_Key
streamlit run app.py
• Use SSH to connect to the EC2 instance.
ssh -i "key_pdf_app.pem" [email protected]
• Copy all files from your local machine to the EC2 instance:
scp -i "key_pdf_app.pem" -r ./Chat-with-PDF-Document-using-GenAI [email protected]:~/.
sudo yum update -y
sudo yum install python3 -y
pip3 install -r requirements.txt
streamlit run app.py
Open the EC2 public IPv4 DNS in your browser: http://13.60.243.154:8501/
Author: https://www.linkedin.com/in/kaushik-puttaswamy-data-analyst/