Merge branch 'feature/talk_to_data' into feature/talk_to_ipcc
Browse files- climateqa/engine/talk_to_data/main.py +1 -1
- climateqa/engine/talk_to_data/query.py +2 -2
- requirements.txt +1 -1
- style.css +1 -1
climateqa/engine/talk_to_data/main.py
CHANGED
|
@@ -121,4 +121,4 @@ async def ask_ipcc(query: str, index_state: int = 0, user_id: str | None = None)
|
|
| 121 |
|
| 122 |
log_drias_interaction_to_huggingface(query, sql_query, user_id)
|
| 123 |
|
| 124 |
-
return sql_query, dataframe, figure, plot_information, sql_queries, result_dataframes, figures, plot_informations, index_state, plot_title_list, ""
|
|
|
|
| 121 |
|
| 122 |
log_drias_interaction_to_huggingface(query, sql_query, user_id)
|
| 123 |
|
| 124 |
+
return sql_query, dataframe, figure, plot_information, sql_queries, result_dataframes, figures, plot_informations, index_state, plot_title_list, ""
|
climateqa/engine/talk_to_data/query.py
CHANGED
|
@@ -41,10 +41,10 @@ async def execute_sql_query(sql_query: str) -> pd.DataFrame:
|
|
| 41 |
def _execute_query():
|
| 42 |
# Execute the query
|
| 43 |
con = duckdb.connect()
|
| 44 |
-
|
| 45 |
con.execute(f"""CREATE SECRET hf_token (
|
| 46 |
TYPE huggingface,
|
| 47 |
-
TOKEN '{
|
| 48 |
);""")
|
| 49 |
results = con.execute(sql_query).fetchdf()
|
| 50 |
# return fetched data
|
|
|
|
| 41 |
def _execute_query():
|
| 42 |
# Execute the query
|
| 43 |
con = duckdb.connect()
|
| 44 |
+
HF_TTD_TOKEN = os.getenv("HF_TTD_TOKEN")
|
| 45 |
con.execute(f"""CREATE SECRET hf_token (
|
| 46 |
TYPE huggingface,
|
| 47 |
+
TOKEN '{HF_TTD_TOKEN}'
|
| 48 |
);""")
|
| 49 |
results = con.execute(sql_query).fetchdf()
|
| 50 |
# return fetched data
|
requirements.txt
CHANGED
|
@@ -26,4 +26,4 @@ duckdb==1.2.1
|
|
| 26 |
openai==1.61.1
|
| 27 |
pydantic==2.9.2
|
| 28 |
pydantic-settings==2.2.1
|
| 29 |
-
geojson==3.2.0
|
|
|
|
| 26 |
openai==1.61.1
|
| 27 |
pydantic==2.9.2
|
| 28 |
pydantic-settings==2.2.1
|
| 29 |
+
geojson==3.2.0
|
style.css
CHANGED
|
@@ -741,4 +741,4 @@ div#tab-vanna{
|
|
| 741 |
#example-img-container {
|
| 742 |
flex-direction: column;
|
| 743 |
align-items: left;
|
| 744 |
-
}
|
|
|
|
| 741 |
#example-img-container {
|
| 742 |
flex-direction: column;
|
| 743 |
align-items: left;
|
| 744 |
+
}
|