Skip to content

Commit

Permalink
Merge pull request #5 from izam-mohammed/main
Browse files Browse the repository at this point in the history
update develop
  • Loading branch information
izam-mohammed authored Dec 22, 2023
2 parents a6a12e9 + 170e52d commit b14109a
Show file tree
Hide file tree
Showing 33 changed files with 8,283 additions and 415 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,4 @@ cython_debug/
# artifacts in the process
artifacts/
streamlit_files/
*.sqlite
File renamed without changes.
File renamed without changes.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)


Expand Down
11 changes: 9 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")

Expand Down
7 changes: 5 additions & 2 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
prompt_file_path: artifacts/prompt_generation/prompt.txt
images_file_path: artifacts/prompt_generation/images.joblib
trulens_db_name: gemInsights.sqlite
3 changes: 3 additions & 0 deletions main_prompt.txt
Original file line number Diff line number Diff line change
@@ -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
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ PyYAML
autoviz
ipython
google-cloud-aiplatform
-e .
markdown
litellm
-e .
22 changes: 11 additions & 11 deletions research/00_data_ingestion.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{
"data": {
"text/plain": [
"'/home/izam/coding/hackathon'"
"'/home/izam/coding/GemInsights'"
]
},
"execution_count": 1,
Expand Down Expand Up @@ -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"
]
}
],
Expand Down Expand Up @@ -185,7 +185,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.18"
"version": "3.11.5"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit b14109a

Please sign in to comment.