team_physco_file_round2_demo_vedio.mp4
This project demonstrates a web-based application to query a dataset through natural language using AI-powered solutions.
- Error Handling - Included try-except block to catch and display errors from both PandasAI and Google GenerativeAI and added voice recognition error handling.
- Real time Query Suggestions - Added an expander with the sample query suggestions assiting users in formatting queries.
- Advanced Visualization - Utilized plotly library for plotting the retrieved data which is the actual response.
Travel to the root of the directory !
For this purpose, it uses:
- [Streamlit] to build a data science web app.
- PandasAI to generate Pandas code from a query.
- Google Generative AI (Gemini) to process natural language queries.
Download the dataset "data" folder to the root folder of directory , from dataset.
If you don't have a Python environment available, you can use the conda package manager which comes with the Anaconda distribution to manage a clean Python environment.
Create a new environment and activate it:
conda create -n streamlit-pandasai python=3.9
conda activate streamlit-pandasaiIn your active conda environment install dependencies :
pip install streamlit google-generativeai python-dotenv pandas pandasai numpy faker pydantic requests pyyaml SpeechRecognition plotly- Get your apis key from Pandasai and GoogleAPI.
- Replace the 'your_pandasai_api_key' and 'your_google_api_key' with your actual apis key in your main.py file with your actual api key.
- Save the changes.
streamlit run main.pyTherefore , our query generator not only give the SQL query but also it's explanation , the output and the visual reperesentation of data.