Skip to content

Commit

Permalink
Otherwa (#15)
Browse files Browse the repository at this point in the history
* /updates + column qual -> quan, graph + /

* /file+ dir setup 30%/

* /test_data/

* /changes/

* /line/

* /
+ dataframe editor file.py
+ charts file.py
+ components folder
+ moulde folder
/

* /minor fixes/

* /df fixes/

* /fixes/

* /+req/

* /req/

* /chnages/

---------

Co-authored-by: Otherwa <[email protected]>
  • Loading branch information
Otherwa and Otherwa authored Nov 26, 2023
1 parent 46b94ef commit 2ac1699
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 5 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,9 @@ cython_debug/
# ? SPACE FILES
.env
Spacefile
.space
<<<<<<< HEAD
.space
cache
=======
.space
>>>>>>> 46b94ef52bcb30a222ea766dbdf1197d14331d44
4 changes: 2 additions & 2 deletions .streamlit/config.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[theme]
base="light"
primaryColor="#e02e2e"
textColor="#2e2f37"
primaryColor="#d42fbc"
textColor="#000000"
Binary file modified cache/cache_db.db
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ streamlit-option-menu
streamlit-pandas-profiling
plotly
pymongo
tk
tk
11 changes: 10 additions & 1 deletion src/modules/file/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,16 @@ def format_other(self, result):
def query_csv_transformers(df, user_question, api):
llm = OpenAI(api_token=openai_api_key)
if api:
pandas_ai = SmartDataframe(df, config={"llm": llm})
pandas_ai = SmartDataframe(
df,
config={
"llm": llm,
"save_charts": True,
"save_charts_path": r"./data/charts",
},
)
response = pandas_ai.chat(user_question)
print(response)
if response == None:
return {"answer": None}
return {"answer": response}

0 comments on commit 2ac1699

Please sign in to comment.