diff --git a/.gitignore b/.gitignore index 4528ecc..30b2fb5 100644 --- a/.gitignore +++ b/.gitignore @@ -162,3 +162,4 @@ cython_debug/ # artifacts in the process artifacts/ streamlit_files/ +*.sqlite \ No newline at end of file diff --git a/research/.streamlit/config.toml b/.streamlit/config.toml similarity index 100% rename from research/.streamlit/config.toml rename to .streamlit/config.toml diff --git a/research/.streamlit/credentials.toml b/.streamlit/credentials.toml similarity index 100% rename from research/.streamlit/credentials.toml rename to .streamlit/credentials.toml diff --git a/README.md b/README.md index 1e32e94..7ea4e17 100644 --- a/README.md +++ b/README.md @@ -54,8 +54,12 @@ These installation instructions assume that you have conda installed and added t streamlit run app.py ``` -### pipelines +6. Run the Trulens server for check the performance + ```bash + python trulens_evaluate.py + ``` +### pipelines - Visualizations - Prompt Creation @@ -67,10 +71,10 @@ These installation instructions assume that you have conda installed and added t - [Izam Mohammed](github.com/izam-mohammed) -- [Vishu Prasad]() +- [Vishu Prakash](github.com/vishnuprksh) - [Afsal](https://github.com/AfsalAfzz-Pro) - [Josekutty](github.com/jkutty-7) -- [AbduRahiman]() +- [AbduRahiman](https://github.com/abdurahiman-offc) - [Amal](https://github.com/Amallmmd) diff --git a/app.py b/app.py index 7f44cd8..c7c1672 100644 --- a/app.py +++ b/app.py @@ -6,15 +6,22 @@ from gemInsights import logger from markdown import markdown + if not os.path.isdir("streamlit_files"): os.makedirs(os.path.join(os.getcwd(), "streamlit_files"), exist_ok=True) dataframe = None st.title("GemInsights") -file = st.file_uploader("Pick a dataframe", type=["csv"], accept_multiple_files=False) +file = st.file_uploader( + "Pick a dataframe", type=["csv", "xlsx"], accept_multiple_files=False +) if file is not None: - dataframe = pd.read_csv(file) + _, extension = os.path.splitext(file.name) + if extension == ".csv": + dataframe = pd.read_csv(file) + else: + dataframe = pd.read_excel(file) st.write(dataframe.head()) st.write(f"updated a dataframe with shape {dataframe.shape}") diff --git a/config/config.yaml b/config/config.yaml index 4a73265..d80c206 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -16,7 +16,8 @@ prompt_generation: data_path: artifacts/data_ingestion/data.csv visualization_path: artifacts/data_visualization/ data_information_file: artifacts/data_ingestion/data_info.json - prompt_file_name: prompt.joblib + prompt_file_name: prompt.txt + images_file_name: images.joblib prompting: root_dir: artifacts/prompting @@ -25,4 +26,6 @@ prompting: candidates_file_name: candidates.json project_name: ultra-heading-407815 project_location: us-central1 - prompt_file_path: artifacts/prompt_generation/prompt.joblib \ No newline at end of file + prompt_file_path: artifacts/prompt_generation/prompt.txt + images_file_path: artifacts/prompt_generation/images.joblib + trulens_db_name: gemInsights.sqlite \ No newline at end of file diff --git a/main_prompt.txt b/main_prompt.txt new file mode 100644 index 0000000..ca06349 --- /dev/null +++ b/main_prompt.txt @@ -0,0 +1,3 @@ +Act as a data analyst. +Here is the complete information and visualization images of a dataset. +give valuable insights from the data point wise \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 7d68e55..4d0ce7a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,4 +14,6 @@ PyYAML autoviz ipython google-cloud-aiplatform --e . \ No newline at end of file +markdown +litellm +-e . diff --git a/research/00_data_ingestion.ipynb b/research/00_data_ingestion.ipynb index 4af5e48..72675a2 100644 --- a/research/00_data_ingestion.ipynb +++ b/research/00_data_ingestion.ipynb @@ -8,7 +8,7 @@ { "data": { "text/plain": [ - "'/home/izam/coding/hackathon'" + "'/home/izam/coding/GemInsights'" ] }, "execution_count": 1, @@ -131,21 +131,21 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "[2023-12-21 13:24:17,901: INFO: common: yaml file: config/config.yaml loaded successfully]\n", - "[2023-12-21 13:24:17,903: INFO: common: yaml file: params.yaml loaded successfully]\n", - "[2023-12-21 13:24:17,903: INFO: common: created directory at: artifacts]\n", - "[2023-12-21 13:24:17,904: INFO: common: created directory at: artifacts/data_ingestion]\n", - "[2023-12-21 13:24:17,908: INFO: 1086895689: loaded the dataframe with shape (891, 12)]\n", - "[2023-12-21 13:24:17,914: INFO: 1086895689: saved the data in artifacts/data_ingestion/data.csv]\n", - "[2023-12-21 13:24:17,915: INFO: common: json file loaded succesfully from: streamlit_files/additional_data.json]\n", - "[2023-12-21 13:24:17,915: INFO: common: json file saved at: artifacts/data_ingestion/data_info.json]\n" + "[2023-12-22 00:28:12,608: INFO: common: yaml file: config/config.yaml loaded successfully]\n", + "[2023-12-22 00:28:12,610: INFO: common: yaml file: params.yaml loaded successfully]\n", + "[2023-12-22 00:28:12,611: INFO: common: created directory at: artifacts]\n", + "[2023-12-22 00:28:12,611: INFO: common: created directory at: artifacts/data_ingestion]\n", + "[2023-12-22 00:28:12,630: INFO: 1086895689: loaded the dataframe with shape (7043, 22)]\n", + "[2023-12-22 00:28:12,661: INFO: 1086895689: saved the data in artifacts/data_ingestion/data.csv]\n", + "[2023-12-22 00:28:12,663: INFO: common: json file loaded succesfully from: streamlit_files/additional_data.json]\n", + "[2023-12-22 00:28:12,664: INFO: common: json file saved at: artifacts/data_ingestion/data_info.json]\n" ] } ], @@ -185,7 +185,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.18" + "version": "3.11.5" } }, "nbformat": 4, diff --git a/research/01_data_visualization.ipynb b/research/01_data_visualization.ipynb index a419257..e2d0211 100644 --- a/research/01_data_visualization.ipynb +++ b/research/01_data_visualization.ipynb @@ -8,7 +8,7 @@ { "data": { "text/plain": [ - "'/home/izam/coding/hackathon'" + "'/home/izam/coding/GemInsights'" ] }, "execution_count": 1, @@ -135,11 +135,11 @@ "application/vnd.holoviews_exec.v0+json": "", "text/html": [ "