A powerful Question and Answer system built with Google's Gemini Pro API, featuring vector storage with AstraDB and LLM monitoring with LangSmith.
- π¬ Text Q&A: Ask questions and get detailed answers powered by Gemini Pro
- πΌοΈ Image Analysis: Upload images for AI-powered analysis with Gemini Pro Vision
- π Document Processing: Extract and analyze text from PDF, DOCX, and other file formats
- π URL Processing: Analyze content from web pages and YouTube videos
- π Semantic Search: Find similar content using vector embeddings
- π LLM Monitoring: Track and analyze model performance with LangSmith
- ποΈ Vector Storage: Store and retrieve vectors using AstraDB
- π Web Interface: Clean, responsive Flask web application
Technology | Purpose |
---|---|
Core language | |
Web framework | |
LLM model | |
Vector database | |
LLM monitoring | |
Text embeddings | |
Containerization | |
Cloud hosting |
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β β β β β
β Web Interface ββββββΆβ Flask Backend ββββββΆβ Gemini Pro β
β β β β β β
βββββββββββββββββββ ββββββββββ¬βββββββββ βββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββ
β β
β File/URL/Image Processing β
β β
ββββββββββββββββ¬βββββββββββββββ
β
βββββββββββββββΌβββββββββββββββ
β β
β Sentence Transformers β
β (Vector Embeddings) β
β β
ββββββββββββββββ¬ββββββββββββββ
β
ββββββββββββββββββββ β βββββββββββββββββββββ
β β β β β
β AstraDB βββ΄ββΆβ LangSmith β
β (Vector Store) β β (Monitoring) β
β β β β
ββββββββββββββββββββ βββββββββββββββββββββ
- Python 3.10 or higher
- Google API key for Gemini Pro
- AstraDB account and token
- (Optional) LangSmith API key
-
Clone the repository:
git clone https://github.com/VisionExpo/QA-System-using-Gemini-Pro-API.git cd QA-System-using-Gemini-Pro-API
-
Run the setup script:
For Windows:
setup_env.bat
For macOS/Linux:
chmod +x setup_env.sh ./setup_env.sh
This script will:
- π¨ Create a virtual environment
- β‘ Activate the virtual environment
- π¦ Install dependencies
- π Create a
.env
file from the example if it doesn't exist
-
Edit the
.env
file and add your API keys:GOOGLE_API_KEY
: Your Google API keyASTRA_DB_TOKEN
: Your AstraDB tokenASTRA_DB_ENDPOINT
: Your AstraDB endpointLANGCHAIN_API_KEY
: (Optional) Your LangSmith API key
-
Clone the repository:
git clone https://github.com/VisionExpo/QA-System-using-Gemini-Pro-API.git cd QA-System-using-Gemini-Pro-API
-
Create and activate a virtual environment:
For Windows:
python -m venv venv venv\Scripts\activate
For macOS/Linux:
python -m venv venv source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Set up your environment variables:
cp .env.example .env
Then edit the
.env
file to add your API keys.
python app.py
Then open http://127.0.0.1:5000 in your web browser.
Ask any question and get detailed answers from Gemini Pro:
- General knowledge questions
- Coding help
- Explanations of complex topics
- Creative writing assistance
Upload images for AI-powered analysis:
- Object identification
- Scene description
- Text extraction from images
- Visual content analysis
Upload and analyze documents:
- PDF files
- Word documents (DOCX)
- Text files
- CSV data
Analyze content from:
- Web pages
- YouTube videos (transcripts and summaries)
- Online articles
This application is deployed on Render. You can access it at: https://qa-system-using-gemini-pro-api-1.onrender.com/
For detailed deployment instructions, see RENDER_DEPLOYMENT.md.
To run tests:
python -m pytest tests/
This project is licensed under the MIT License - see the LICENSE file for details.
- Google for the Gemini Pro API
- DataStax for AstraDB
- LangChain for LangSmith
- The open-source community for various libraries used in this project
For questions or feedback, please open an issue on GitHub or contact the maintainer at gorulevishal984@gmail.com.
Made with β€οΈ by Vishal Gorule