This project creates a Streamlit application named PdfProject that allows users to chat with a Gemini to search and retrieve information from uploaded PDFs.
Features: Upload multiple PDFs. Ask questions about the content of the PDFs. Get answers generated by a powerful LLM using the retrieved information. Maintain conversation history for a more natural interaction. Clear conversation history with a button (optional).
Technologies Used: Streamlit: Web framework for building data apps. langchain: Library for building conversational AI systems. pypdfium2: Library for extracting text from PDFs. Google Generative AI Embeddings: Service for text embedding (requires API key). ChatGoogleGenerativeAI: Class for interacting with a generative LLM for conversation.
Running the Project:
Install required libraries:
Bash-
pip install streamlit langchain pypdfium2
Create a .env file in the project directory containing:
GOOGLE_API_KEY = 'YOUR_API_KEY'
HUGGINGFACE_HUB_API_TOKENS = 'YOUR_API_KEY'
Replace YOUR_API_KEY with your actual Google API key.
Run the app: Bash
streamlit run app.py
How it Works:
Install my-project with npm
npm install my-project
cd my-project