This repository hosts a Flask-based API for answering user queries using Gemini and Pinecone integrations.
Open a terminal in your desired folder and run:
git clone https://github.com/vijender883/Answer_Query_flask_app
cd Answer_Query_flask_apppython -m venv venv
venv\Scripts\activate
pip install -r requirements.txtOpen PowerShell:
- Search for "PowerShell" in the Start menu and open Windows PowerShell.
- Navigate to your desired folder:
cd C:\Users\YourUser\Documents\GitHubCreate a Virtual Environment:
python -m venv venvThis creates a folder named venv in your project directory.
Activate the Virtual Environment:
.\venv\Scripts\Activate.ps1Note: If you encounter an execution policy error, run:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy BypassThen try activating again. To revert later:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy DefaultYou should now see (venv) in your prompt.
Install Required Packages:
pip install -r requirements.txtpython3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtpython3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtIn the root of the project, create a file named .env and add the following:
GEMINI_API_KEY=your_gemini_api_key
PINECONE_API_KEY=your_pinecone_api_key
PINECONE_CLOUD=aws
PINECONE_REGION=us-east-1
PINECONE_INDEX=your_index_name
MCP_PORT=8000python answer_query.pyServer will run at: http://127.0.0.1:5000
POST request to:
http://127.0.0.1:5000/api/answer
JSON Body:
{
"query": "your query about the data",
"previous_chats": "optional previous context"
}For questions or suggestions, feel free to open an issue or contact the repo maintainer.