Skip to content

Commit 2ac1699

Browse files
authored
Otherwa (#15)
* /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]>
1 parent 46b94ef commit 2ac1699

File tree

6 files changed

+19
-5
lines changed

6 files changed

+19
-5
lines changed

.gitignore

+6-1
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,9 @@ cython_debug/
162162
# ? SPACE FILES
163163
.env
164164
Spacefile
165-
.space
165+
<<<<<<< HEAD
166+
.space
167+
cache
168+
=======
169+
.space
170+
>>>>>>> 46b94ef52bcb30a222ea766dbdf1197d14331d44

.streamlit/config.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[theme]
22
base="light"
3-
primaryColor="#e02e2e"
4-
textColor="#2e2f37"
3+
primaryColor="#d42fbc"
4+
textColor="#000000"

cache/cache_db.db

0 Bytes
Binary file not shown.
Loading

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ streamlit-option-menu
88
streamlit-pandas-profiling
99
plotly
1010
pymongo
11-
tk
11+
tk

src/modules/file/query.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,16 @@ def format_other(self, result):
3535
def query_csv_transformers(df, user_question, api):
3636
llm = OpenAI(api_token=openai_api_key)
3737
if api:
38-
pandas_ai = SmartDataframe(df, config={"llm": llm})
38+
pandas_ai = SmartDataframe(
39+
df,
40+
config={
41+
"llm": llm,
42+
"save_charts": True,
43+
"save_charts_path": r"./data/charts",
44+
},
45+
)
3946
response = pandas_ai.chat(user_question)
4047
print(response)
48+
if response == None:
49+
return {"answer": None}
4150
return {"answer": response}

0 commit comments

Comments
 (0)